forked from extern/egroupware
This limits holiday management functions to only admins.
This commit is contained in:
parent
e73a82a001
commit
7afff4dd37
@ -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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
@ -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');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user