Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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);
});
}