forked from extern/egroupware
dded a way for apps to allow certain pages only to admins while keeping there currentapp set to the real appname.
$phpgw_info['flags']['admin_only'] = True; is the format
This commit is contained in:
parent
5304ec67f1
commit
f35780f925
@ -492,9 +492,15 @@
|
|||||||
$phpgw_info['flags']['currentapp'] != 'preferences' &&
|
$phpgw_info['flags']['currentapp'] != 'preferences' &&
|
||||||
$phpgw_info['flags']['currentapp'] != 'about')
|
$phpgw_info['flags']['currentapp'] != 'about')
|
||||||
{
|
{
|
||||||
if (! $phpgw_info['user']['apps'][$phpgw_info['flags']['currentapp']])
|
// This will need to use ACL in the future
|
||||||
|
if (! $phpgw_info['user']['apps'][$phpgw_info['flags']['currentapp']] || ($phpgw_info['flags']['admin_only'] && ! $phpgw_info['user']['apps']['admin']))
|
||||||
{
|
{
|
||||||
$phpgw->common->phpgw_header();
|
$phpgw->common->phpgw_header();
|
||||||
|
if ($phpgw_info['flags']['noheader'])
|
||||||
|
{
|
||||||
|
echo parse_navbar();
|
||||||
|
}
|
||||||
|
|
||||||
echo '<p><center><b>'.lang('Access not permitted').'</b></center>';
|
echo '<p><center><b>'.lang('Access not permitted').'</b></center>';
|
||||||
$phpgw->common->phpgw_exit(True);
|
$phpgw->common->phpgw_exit(True);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user