summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-06-13 18:11:54 -0500
committerGitHub <noreply@github.com>2017-06-13 18:11:54 -0500
commit1d2c1cf579927c460d08eb7aa4270090f35b2ad6 (patch)
tree9359e7a2985d5ed915e905ebff2d385e96b67f9a
parentd4eb5cfecbb54d4e36d0c225066fca8337cf8b0b (diff)
parent01b6a3da86422ded00657d40e7e8221fd7e7f165 (diff)
downloadnextcloud-server-1d2c1cf579927c460d08eb7aa4270090f35b2ad6.tar.gz
nextcloud-server-1d2c1cf579927c460d08eb7aa4270090f35b2ad6.zip
Merge pull request #5296 from nextcloud/bugfix-stable12/5077/allow_proppatches_to_birthday_calendar
[stable12] allow PropPatch requests to contact_birthdays
-rw-r--r--apps/dav/lib/CalDAV/Calendar.php7
-rw-r--r--apps/dav/tests/unit/CalDAV/CalendarTest.php4
2 files changed, 11 insertions, 0 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index 9c56398b14c..c03bf98ee38 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -122,7 +122,14 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
'principal' => $this->getOwner(),
'protected' => true,
];
+ } else {
+ $acl[] = [
+ 'privilege' => '{DAV:}write-properties',
+ 'principal' => $this->getOwner(),
+ 'protected' => true,
+ ];
}
+
if ($this->getOwner() !== parent::getOwner()) {
$acl[] = [
'privilege' => '{DAV:}read',
diff --git a/apps/dav/tests/unit/CalDAV/CalendarTest.php b/apps/dav/tests/unit/CalDAV/CalendarTest.php
index cf295f01065..fd74da0214b 100644
--- a/apps/dav/tests/unit/CalDAV/CalendarTest.php
+++ b/apps/dav/tests/unit/CalDAV/CalendarTest.php
@@ -191,6 +191,10 @@ class CalendarTest extends TestCase {
'privilege' => '{DAV:}read',
'principal' => $hasOwnerSet ? 'user1' : 'user2',
'protected' => true
+ ], [
+ 'privilege' => '{DAV:}write-properties',
+ 'principal' => $hasOwnerSet ? 'user1' : 'user2',
+ 'protected' => true
]];
}
if ($hasOwnerSet) {