aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-12-04 15:19:49 +0100
committerGitHub <noreply@github.com>2018-12-04 15:19:49 +0100
commit64716dd56983ce4c0d1d610db0267db88334b093 (patch)
treeca4658ff46ca083eff1b2654d429eb933f340fab /apps/dav
parent43cb51d374421cca2bef3008b3adad9d9668a726 (diff)
parent29eff7b1227d3b36d009b1b2bd3e5d146109ba1e (diff)
downloadnextcloud-server-64716dd56983ce4c0d1d610db0267db88334b093.tar.gz
nextcloud-server-64716dd56983ce4c0d1d610db0267db88334b093.zip
Merge pull request #12813 from nextcloud/fix/system_address_book
Fix the system address book
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CardDAV/AddressBook.php15
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'];