diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2018-12-05 08:42:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-05 08:42:29 +0100 |
commit | 218b83b6565d33adbc587cf45478f8ca1df84c05 (patch) | |
tree | 7ebadd8b7a284a96556aaad5af8d2c7fe17916ef | |
parent | f65ec57243f6b755c8e789c3b520553f08b942f9 (diff) | |
parent | 2bb278ecb02955674535b734a3c442c50fbd75a9 (diff) | |
download | nextcloud-server-218b83b6565d33adbc587cf45478f8ca1df84c05.tar.gz nextcloud-server-218b83b6565d33adbc587cf45478f8ca1df84c05.zip |
Merge pull request #12817 from nextcloud/backport/12813/stable14
[stable14] Fix the system address book
-rw-r--r-- | apps/dav/lib/CardDAV/AddressBook.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 30ce0a3253c..096f5c8b2a9 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -112,6 +112,14 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { ] ]; + if ($this->getOwner() === 'principals/system/system') { + $acl[] = [ + 'privilege' => '{DAV:}read', + 'principal' => '{DAV:}authenticated', + 'protected' => true, + ]; + } + if (!$this->isShared()) { return $acl; } @@ -130,13 +138,6 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { ]; } } - if ($this->getOwner() === 'principals/system/system') { - $acl[] = [ - 'privilege' => '{DAV:}read', - 'principal' => '{DAV:}authenticated', - 'protected' => true, - ]; - } $acl = $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl); $allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/system']; |