mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 01:43:47 +01:00
Filter applications in context menu to remove those the user has no access to.
This commit is contained in:
parent
ec9be026dd
commit
fb295089a6
@ -410,6 +410,16 @@ class home_ui
|
|||||||
return $list;
|
return $list;
|
||||||
}, array(), 60);
|
}, array(), 60);
|
||||||
|
|
||||||
|
// Filter list by current user's permissions
|
||||||
|
foreach($list as $appname => $children)
|
||||||
|
{
|
||||||
|
if(in_array($appname, array_keys($GLOBALS['egw_info']['apps']))) {
|
||||||
|
if(!in_array($appname, array_keys($GLOBALS['egw_info']['user']['apps'])))
|
||||||
|
{
|
||||||
|
unset($list[$appname]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return $list;
|
return $list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user