Skip to content

Commit

Permalink
Merge pull request #38465 from nextcloud/fix/read-only-system-addres-…
Browse files Browse the repository at this point in the history
…book-acls-stable21

[stable21] fix(carddav): Mark system address book as read-only
  • Loading branch information
blizzz authored May 25, 2023
2 parents 159676f + f66322e commit e907728
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/dav/lib/CardDAV/SystemAddressbook.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,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;
});
}
}

0 comments on commit e907728

Please sign in to comment.