diff --git a/apps/dav/lib/CardDAV/SystemAddressbook.php b/apps/dav/lib/CardDAV/SystemAddressbook.php index 502e353acb313..1c78e03162e60 100644 --- a/apps/dav/lib/CardDAV/SystemAddressbook.php +++ b/apps/dav/lib/CardDAV/SystemAddressbook.php @@ -30,6 +30,7 @@ use OCP\IConfig; use OCP\IL10N; use Sabre\CardDAV\Backend\BackendInterface; +use function array_filter; class SystemAddressbook extends AddressBook { /** @var IConfig */ @@ -50,4 +51,13 @@ public function getChildren() { return parent::getChildren(); } + + public function getACL() { + return array_filter(parent::getACL(), function($acl) { + if (in_array($acl['privilege'], ['{DAV:}write', '{DAV:}all'], true)) { + return false; + } + return true; + }); + } }