summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2013-03-06 16:33:03 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2013-03-06 16:33:03 (GMT)
commit598cc5aa7625257f2bd06bdc96836d633b49f452 (patch)
treec87bd2005fe41c934d6578ffef5903fb9725edea
parent793017e32d10d1f59fbc1099198c0d199f4640e6 (diff)
downloadiRony-598cc5aa7625257f2bd06bdc96836d633b49f452.tar.gz
Advertise owner of shared calendars; prepare for sharing support
-rw-r--r--lib/Kolab/CalDAV/Calendar.php2
-rw-r--r--lib/Kolab/CalDAV/CalendarBackend.php8
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/Kolab/CalDAV/Calendar.php b/lib/Kolab/CalDAV/Calendar.php
index 93ffd23..b86fd4e 100644
--- a/lib/Kolab/CalDAV/Calendar.php
+++ b/lib/Kolab/CalDAV/Calendar.php
@@ -71,7 +71,7 @@ class Calendar extends \Sabre\CalDAV\Calendar
return $this->calendarInfo['principaluri'];
}
else {
- return null; // return $this->storage->get_owner();
+ return 'principals/' . $this->storage->get_owner();
}
}
diff --git a/lib/Kolab/CalDAV/CalendarBackend.php b/lib/Kolab/CalDAV/CalendarBackend.php
index 001dc2c..147fba2 100644
--- a/lib/Kolab/CalDAV/CalendarBackend.php
+++ b/lib/Kolab/CalDAV/CalendarBackend.php
@@ -78,6 +78,14 @@ class CalendarBackend extends CalDAV\Backend\AbstractBackend
'{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set' => new CalDAV\Property\SupportedCalendarComponentSet(array('VEVENT')),
'{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp' => new CalDAV\Property\ScheduleCalendarTransp('opaque'),
);
+
+ // these properties are used for sahring supprt (not yet active)
+ if (false && $folder->get_namespace() != 'personal') {
+ $rights = $folder->get_myrights();
+ $this->calendars[$id]['{http://calendarserver.org/ns/}shared-url'] = '/calendars/' . $folder->get_owner() . '/' . $id;
+ $this->calendars[$id]['{http://calendarserver.org/ns/}owner-principal'] = $folder->get_owner();
+ $this->calendars[$id]['{http://sabredav.org/ns}read-only'] = strpos($rights, 'i') === false;
+ }
}
return $this->calendars;