From 362366ed28f4905ea07e78685f3101ac79af3db7 Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 24 May 2016 17:13:40 -0600 Subject: [PATCH] Fix addressbook - calendar permission issue blocking viewing contact calendar --- api/src/Contacts.php | 2 +- calendar/inc/class.calendar_uilist.inc.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/api/src/Contacts.php b/api/src/Contacts.php index a5572d015d..8be370db5c 100755 --- a/api/src/Contacts.php +++ b/api/src/Contacts.php @@ -1586,7 +1586,7 @@ class Contacts extends Contacts\Storage $data[] = array( 'res_id' => $id, 'email' => $contact['email'] ? $contact['email'] : $contact['email_home'], - 'rights' => EGW_ACL_READ_FOR_PARTICIPANTS, + 'rights' => Acl::CUSTOM1, 'name' => $this->link_title($contact), 'cn' => trim($contact['n_given'].' '.$contact['n_family']), ); diff --git a/calendar/inc/class.calendar_uilist.inc.php b/calendar/inc/class.calendar_uilist.inc.php index b301510ed7..c48903c744 100644 --- a/calendar/inc/class.calendar_uilist.inc.php +++ b/calendar/inc/class.calendar_uilist.inc.php @@ -371,9 +371,9 @@ class calendar_uilist extends calendar_ui { $search_params['users'] = is_array($params['col_filter']['participant']) ? $params['col_filter']['participant'] : array( $params['col_filter']['participant']); } - elseif (!$params['col_filter'] || !array_key_exists('participant',$params['col_filter'])) + elseif (!$params['col_filter'] || !$params['col_filter']['participant']) { - $search_params['users'] = explode(',',$this->owner); + $search_params['users'] = $params['owner'] ? $params['owner'] : explode(',',$this->owner); } if ($params['col_filter']) { @@ -396,6 +396,7 @@ class calendar_uilist extends calendar_ui (count($search_params['users']) == 1 ? $this->bo->participant_name($search_params['users'][0]).': ' : '') . $label); } + error_log(__METHOD__ . ' ' .array2string($search_params)); foreach((array) $this->bo->search($search_params, !empty($col_filter) ? $col_filter : null) as $event) {