]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(carddav): Mark system address book as read-only 38465/head
authorChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 8 May 2023 17:41:06 +0000 (19:41 +0200)
committerChristoph Wurst <christoph@winzerhof-wurst.at>
Mon, 15 May 2023 08:53:27 +0000 (10:53 +0200)
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
apps/dav/lib/CardDAV/SystemAddressbook.php

index 5b9521527111ee0fda01abc0307a31a0faf02306..4bfd633cf3f246ceaaf5d7c9afedd744b51fe967 100644 (file)
@@ -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;
+               });
+       }
 }