From 0f1d47cdf3d2923f3ea85d4601e0a31d8e8e4e1e Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Thu, 8 Jun 2017 09:21:56 +0200 Subject: [PATCH] allow users to send PropPatch request when calendar is group-shared with them Signed-off-by: Georg Ehrke --- apps/dav/lib/CalDAV/Calendar.php | 6 ++++++ apps/dav/tests/unit/CalDAV/CalendarTest.php | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index 9c56398b14..9f4e30710e 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -135,6 +135,12 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { 'principal' => parent::getOwner(), 'protected' => true, ]; + } else { + $acl[] = [ + 'privilege' => '{DAV:}write-properties', + 'principal' => parent::getOwner(), + 'protected' => true, + ]; } } if ($this->isPublic()) { diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php index cf295f0106..51ae6cd37c 100644 --- a/apps/dav/tests/unit/CalDAV/CalendarTest.php +++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php @@ -205,6 +205,12 @@ class CalendarTest extends TestCase { 'principal' => 'user2', 'protected' => true ]; + } else { + $expectedAcl[] = [ + 'privilege' => '{DAV:}write-properties', + 'principal' => 'user2', + 'protected' => true + ]; } } $this->assertEquals($expectedAcl, $acl);