This limits holiday management functions to only admins.

This commit is contained in:
skeeter 2001-07-28 17:54:59 +00:00
parent e73a82a001
commit 7afff4dd37
2 changed files with 18 additions and 1 deletions

View File

@ -434,5 +434,21 @@
return $this->cached_holidays;
}
/* End Calendar functions */
function check_admin()
{
global $phpgw, $phpgw_info;
$admin = False;
if(@$phpgw_info['user']['apps']['admin'])
{
$admin = True;
}
if(!$admin)
{
Header('Location: ' . $phpgw->link('/index.php'));
}
}
}
?>

View File

@ -39,6 +39,7 @@
$phpgw->nextmatchs = CreateObject('phpgwapi.nextmatchs');
$this->bo = CreateObject('calendar.boholiday');
$this->bo->check_admin();
$this->base_url = $this->bo->base_url;
$this->template_dir = $phpgw->common->get_tpl_dir('calendar');
}