From f60e402eb07f767808c7832abffae173551f8f9c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 17 Sep 2013 16:26:45 +0000 Subject: [PATCH] When editing a user or group's preferences, limit app selection to just those apps the account has access to. --- preferences/inc/class.preferences_settings.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/preferences/inc/class.preferences_settings.inc.php b/preferences/inc/class.preferences_settings.inc.php index 26925d1a45..962f694697 100644 --- a/preferences/inc/class.preferences_settings.inc.php +++ b/preferences/inc/class.preferences_settings.inc.php @@ -429,6 +429,10 @@ class preferences_settings { $content['type'] .= ':'.$id; $sel_options['type'][$content['type']] = common::grab_owner_name($GLOBALS['egw']->preferences->account_id); + + // Restrict app list to apps the user has access to + $user_apps = $GLOBALS['egw']->acl->get_user_applications($id); + $sel_options['appname'] = array_intersect_key($sel_options['appname'], $user_apps); } foreach($GLOBALS['egw']->accounts->search(array('type' => 'groups', 'sort' => 'account_lid')) as $account_id => $group) {