summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/CalDAV/Calendar.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index a216e4e078b..9c56398b14c 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -145,11 +145,16 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
];
}
- if ($this->isShared()) {
+ $acl = $this->caldavBackend->applyShareAcl($this->getResourceId(), $acl);
+
+ if (!$this->isShared()) {
return $acl;
}
- return $this->caldavBackend->applyShareAcl($this->getResourceId(), $acl);
+ $allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/public'];
+ return array_filter($acl, function($rule) use ($allowedPrincipals) {
+ return in_array($rule['principal'], $allowedPrincipals);
+ });
}
public function getChildACL() {