summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV/Calendar.php
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2018-11-14 20:50:46 +0100
committerGeorg Ehrke <developer@georgehrke.com>2018-11-14 21:49:00 +0100
commitc23a66cda46d9a1f0ce8dc60a6c160809c87d9f6 (patch)
tree9a12015b1e7e728b005a730ab2b7470a446a828d /apps/dav/lib/CalDAV/Calendar.php
parent1783fa71765132ac11a4dc21b299ebfa52756bca (diff)
downloadnextcloud-server-c23a66cda46d9a1f0ce8dc60a6c160809c87d9f6.tar.gz
nextcloud-server-c23a66cda46d9a1f0ce8dc60a6c160809c87d9f6.zip
fixes dav share issue with owner
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.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index a07bbe93218..e80bffdb9d0 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -139,6 +139,10 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
];
}
+ if (!$this->isShared()) {
+ return $acl;
+ }
+
if ($this->getOwner() !== parent::getOwner()) {
$acl[] = [
'privilege' => '{DAV:}read',
@@ -168,14 +172,9 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
}
$acl = $this->caldavBackend->applyShareAcl($this->getResourceId(), $acl);
-
- if (!$this->isShared()) {
- return $acl;
- }
-
$allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/public'];
return array_filter($acl, function($rule) use ($allowedPrincipals) {
- return in_array($rule['principal'], $allowedPrincipals);
+ return \in_array($rule['principal'], $allowedPrincipals, true);
});
}