From f66322e7c5aa26a8ac415de4850bd391a5c3d0b6 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Mon, 8 May 2023 19:41:06 +0200 Subject: [PATCH] fix(carddav): Mark system address book as read-only Signed-off-by: Christoph Wurst --- apps/dav/lib/CardDAV/SystemAddressbook.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/dav/lib/CardDAV/SystemAddressbook.php b/apps/dav/lib/CardDAV/SystemAddressbook.php index 5b952152711..4bfd633cf3f 100644 --- a/apps/dav/lib/CardDAV/SystemAddressbook.php +++ b/apps/dav/lib/CardDAV/SystemAddressbook.php @@ -51,4 +51,13 @@ class SystemAddressbook extends AddressBook { 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; + }); + } } -- 2.39.5