From 82fea484c05188e682856a57609623e19d1608a1 Mon Sep 17 00:00:00 2001 From: alext Date: Fri, 10 Mar 2017 09:23:50 +0100 Subject: [PATCH] Do not display read-only google calendars for selection. --- src/application/libraries/Google_sync.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/application/libraries/Google_sync.php b/src/application/libraries/Google_sync.php index e0f643a4..a65dbdb1 100644 --- a/src/application/libraries/Google_sync.php +++ b/src/application/libraries/Google_sync.php @@ -351,6 +351,10 @@ class Google_Sync { $calendarList = $this->service->calendarList->listCalendarList(); $calendars = array(); foreach ($calendarList->items as $google_calendar) { + if ($google_calendar->getAccessRole() === 'reader') { + continue; + } + $calendars[] = array( 'id' => $google_calendar->id, 'summary' => $google_calendar->summary