From 61103e950d6526a39634c5f47f7e01d8a3d6ed59 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 26 Jan 2015 19:23:13 +0000 Subject: [PATCH] Avoid displaying portlets from apps the user has no access to. --- home/inc/class.home_ui.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/inc/class.home_ui.inc.php b/home/inc/class.home_ui.inc.php index d55e6223c6..f0fce6de41 100644 --- a/home/inc/class.home_ui.inc.php +++ b/home/inc/class.home_ui.inc.php @@ -164,6 +164,14 @@ class home_ui ) continue; $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); $desc = $portlet->get_description(); $portlet_content = array(