Do not display read-only google calendars for selection.

This commit is contained in:
alext 2017-03-10 09:23:50 +01:00
parent 34a7277a1e
commit 82fea484c0
1 changed files with 4 additions and 0 deletions

View File

@ -351,6 +351,10 @@ class Google_Sync {
$calendarList = $this->service->calendarList->listCalendarList(); $calendarList = $this->service->calendarList->listCalendarList();
$calendars = array(); $calendars = array();
foreach ($calendarList->items as $google_calendar) { foreach ($calendarList->items as $google_calendar) {
if ($google_calendar->getAccessRole() === 'reader') {
continue;
}
$calendars[] = array( $calendars[] = array(
'id' => $google_calendar->id, 'id' => $google_calendar->id,
'summary' => $google_calendar->summary 'summary' => $google_calendar->summary