mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
Fix the system address book
c23a66cda4 broke the system address book.
We now move the ACL rules for this special case up and all is good in
the world again.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
de83581694
commit
2bb278ecb0
1 changed files with 8 additions and 7 deletions
|
|
@ -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'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue