diff options
author | Anna Larch <anna@nextcloud.com> | 2023-08-17 08:32:44 +0200 |
---|---|---|
committer | Anna <anna@nextcloud.com> | 2023-09-05 10:22:52 +0200 |
commit | 6354dce7ea1b9fdcee344bd9a484988a06b02382 (patch) | |
tree | 792fa8d3149de623b3e7b69ac6357c1029ea4f4f | |
parent | 9ddb07ca1979e178b74184173edec9c6a7b7653e (diff) | |
download | nextcloud-server-6354dce7ea1b9fdcee344bd9a484988a06b02382.tar.gz nextcloud-server-6354dce7ea1b9fdcee344bd9a484988a06b02382.zip |
fix(CardDAV): allow disabling of the system address book via config option
Signed-off-by: Anna Larch <anna@nextcloud.com>
-rw-r--r-- | apps/dav/lib/CardDAV/UserAddressBooks.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/dav/lib/CardDAV/UserAddressBooks.php b/apps/dav/lib/CardDAV/UserAddressBooks.php index 938575bd1a7..4d8812c73df 100644 --- a/apps/dav/lib/CardDAV/UserAddressBooks.php +++ b/apps/dav/lib/CardDAV/UserAddressBooks.php @@ -88,7 +88,8 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { $addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri); // add the system address book $systemAddressBook = null; - if (is_string($principal) && $principal !== 'principals/system/system' && $this->carddavBackend instanceof CardDavBackend) { + $systemAddressBookExposed = $this->config->getAppValue('dav', 'system_addressbook_exposed', 'yes') === 'yes'; + if ($systemAddressBookExposed && is_string($principal) && $principal !== 'principals/system/system' && $this->carddavBackend instanceof CardDavBackend) { $systemAddressBook = $this->carddavBackend->getAddressBooksByUri('principals/system/system', 'system'); if ($systemAddressBook !== null) { $systemAddressBook['uri'] = SystemAddressbook::URI_SHARED; |