diff options
author | Anna Larch <anna@nextcloud.com> | 2023-05-11 18:59:30 +0200 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2023-05-11 18:59:30 +0200 |
commit | 5c2eb732f123c907201a2db36f12f0a269722ce7 (patch) | |
tree | 93f3ac458e66635c7546cf33c81080e00962d088 /apps/dav/lib/CardDAV/CardDavBackend.php | |
parent | 9d2d3d482bce004d134dd87d7b37c3dfb6513412 (diff) | |
download | nextcloud-server-5c2eb732f123c907201a2db36f12f0a269722ce7.tar.gz nextcloud-server-5c2eb732f123c907201a2db36f12f0a269722ce7.zip |
fix(carddav): expose system address book
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/CardDAV/CardDavBackend.php')
-rw-r--r-- | apps/dav/lib/CardDAV/CardDavBackend.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 577d7282eae..5f5b8f1e65f 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -311,6 +311,11 @@ class CardDavBackend implements BackendInterface, SyncSupport { '{http://sabredav.org/ns}sync-token' => $row['synctoken'] ?: '0', ]; + // system address books are always read only + if ($principal === 'principals/system/system') { + $addressBook['{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}read-only'] = true; + } + $this->addOwnerPrincipal($addressBook); return $addressBook; |