From fbe3d2cc7d50950787c85d73a6a02c4ba854aae5 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 10 Mar 2016 17:43:02 +0000 Subject: [PATCH] Only filter accounts by calendar permission, not groups --- .../inc/class.calendar_owner_etemplate_widget.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php index 693e473de4..0eb236d076 100644 --- a/calendar/inc/class.calendar_owner_etemplate_widget.inc.php +++ b/calendar/inc/class.calendar_owner_etemplate_widget.inc.php @@ -50,9 +50,13 @@ class calendar_owner_etemplate_widget extends etemplate_widget_taglist foreach($list as $type) { $account_options = array('account_type' => $type); - $accounts += accounts::link_query('',$account_options); + $accounts_type = accounts::link_query('',$account_options); + if($type == 'accounts') + { + $accounts_type = array_intersect_key($accounts_type, $GLOBALS['egw']->acl->get_grants('calendar')); + } + $accounts += $accounts_type; } - $accounts = array_intersect_key($accounts, $GLOBALS['egw']->acl->get_grants('calendar')); $sel_options += array_map( function($account_id, $account_name) { return array(