Merge pull request #12817 from nextcloud/backport/12813/stable14
[stable14] Fix the system address book
This commit is contained in:
commit
218b83b656
|
@ -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()) {
|
if (!$this->isShared()) {
|
||||||
return $acl;
|
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);
|
$acl = $this->carddavBackend->applyShareAcl($this->getResourceId(), $acl);
|
||||||
$allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/system'];
|
$allowedPrincipals = [$this->getOwner(), parent::getOwner(), 'principals/system/system'];
|
||||||
|
|
Loading…
Reference in New Issue