diff options
author | Georg Ehrke <developer@georgehrke.com> | 2017-02-25 14:26:02 +0100 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2017-03-27 17:21:57 +0200 |
commit | b887adf386063a8264fbb11d2d4380528e380d01 (patch) | |
tree | 8b88684ea62713b3ce492e637aa3221f8c5bd87a /apps/dav/lib/CalDAV/Calendar.php | |
parent | dc5ba954693ba95b687c517b1bad895f706c8309 (diff) | |
download | nextcloud-server-b887adf386063a8264fbb11d2d4380528e380d01.tar.gz nextcloud-server-b887adf386063a8264fbb11d2d4380528e380d01.zip |
allow sharees to edit certain calendar properties for themselves
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav/lib/CalDAV/Calendar.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Calendar.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index ef8e21be83a..d5e41c3c8c5 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -175,12 +175,11 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { } function propPatch(PropPatch $propPatch) { - $mutations = $propPatch->getMutations(); - // If this is a shared calendar, the user can only change the enabled property, to hide it. - if ($this->isShared() && (sizeof($mutations) !== 1 || !isset($mutations['{http://owncloud.org/ns}calendar-enabled']))) { - throw new Forbidden(); + // parent::propPatch will only update calendars table + // if calendar is shared, changes have to be made to the properties table + if (!$this->isShared()) { + parent::propPatch($propPatch); } - parent::propPatch($propPatch); } function getChild($name) { |