Avoid displaying portlets from apps the user has no access to.

This commit is contained in:
Nathan Gray 2015-01-26 19:23:13 +00:00
parent fdff696a0c
commit 61103e950d

View File

@ -164,6 +164,14 @@ class home_ui
) continue; ) continue;
$classname = $context['class']; $classname = $context['class'];
// Avoid portlets for apps user can't use (eg. from defaults/forced)
list($app,$other) = explode('_',$classname);
if(!$GLOBALS['egw_info']['apps'][$app]) $app .='_'.$other;
if(!$GLOBALS['egw_info']['user']['apps'][$app]) {
continue;
}
$portlet = new $classname($context); $portlet = new $classname($context);
$desc = $portlet->get_description(); $desc = $portlet->get_description();
$portlet_content = array( $portlet_content = array(