From 20c7fee5950bef9974a62fc00595d18979a403e2 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 2 Mar 2015 17:36:04 +0000 Subject: [PATCH] Filter applications in context menu to remove those the user has no access to. --- home/inc/class.home_ui.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/home/inc/class.home_ui.inc.php b/home/inc/class.home_ui.inc.php index 05614bf4fc..8db1e857f3 100644 --- a/home/inc/class.home_ui.inc.php +++ b/home/inc/class.home_ui.inc.php @@ -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; }