aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Files/CustomPropertiesBackend.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Files/CustomPropertiesBackend.php')
-rw-r--r--apps/dav/lib/Files/CustomPropertiesBackend.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/apps/dav/lib/Files/CustomPropertiesBackend.php b/apps/dav/lib/Files/CustomPropertiesBackend.php
index 43c02e7d6eb..397c7bb22e3 100644
--- a/apps/dav/lib/Files/CustomPropertiesBackend.php
+++ b/apps/dav/lib/Files/CustomPropertiesBackend.php
@@ -1,9 +1,11 @@
<?php
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
+ * @copyright Copyright (c) 2017, Georg Ehrke <oc.list@georgehrke.com>
*
* @author Robin Appelman <robin@icewind.nl>
* @author Thomas Müller <thomas.mueller@tmit.eu>
+ * @author Georg Ehrke <oc.list@georgehrke.com>
*
* @license AGPL-3.0
*
@@ -102,6 +104,26 @@ class CustomPropertiesBackend implements BackendInterface {
$this->ignoredProperties
);
+ // substr of calendars/ => path is inside the CalDAV component
+ // two '/' => this a calendar (no calendar-home nor calendar object)
+ if (substr($path, 0, 10) === 'calendars/' && substr_count($path, '/') === 2) {
+ $allRequestedProps = $propFind->getRequestedProperties();
+ $customPropertiesForShares = [
+ '{DAV:}displayname',
+ '{urn:ietf:params:xml:ns:caldav}calendar-description',
+ '{urn:ietf:params:xml:ns:caldav}calendar-timezone',
+ '{http://apple.com/ns/ical/}calendar-order',
+ '{http://apple.com/ns/ical/}calendar-color',
+ '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp',
+ ];
+
+ foreach ($customPropertiesForShares as $customPropertyForShares) {
+ if (in_array($customPropertyForShares, $allRequestedProps)) {
+ $requestedProps[] = $customPropertyForShares;
+ }
+ }
+ }
+
if (empty($requestedProps)) {
return;
}