forked from extern/egroupware
Filter applications in context menu to remove those the user has no access to.
This commit is contained in:
parent
97acfb8081
commit
20c7fee595
@ -404,6 +404,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