Filter applications in context menu to remove those the user has no access to.

This commit is contained in:
Nathan Gray 2015-03-02 17:34:29 +00:00
parent ec9be026dd
commit fb295089a6

View File

@ -410,6 +410,16 @@ class home_ui
return $list;
}, 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;
}