mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-05 21:09:52 +01:00
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;
|
return $this->cached_holidays;
|
||||||
}
|
}
|
||||||
/* End Calendar functions */
|
/* 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');
|
$phpgw->nextmatchs = CreateObject('phpgwapi.nextmatchs');
|
||||||
|
|
||||||
$this->bo = CreateObject('calendar.boholiday');
|
$this->bo = CreateObject('calendar.boholiday');
|
||||||
|
$this->bo->check_admin();
|
||||||
$this->base_url = $this->bo->base_url;
|
$this->base_url = $this->bo->base_url;
|
||||||
$this->template_dir = $phpgw->common->get_tpl_dir('calendar');
|
$this->template_dir = $phpgw->common->get_tpl_dir('calendar');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user