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:36:04 +00:00
parent 97acfb8081
commit 20c7fee595

View File

@ -404,6 +404,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;
}