summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-09-06 10:27:14 +0200
committerGitHub <noreply@github.com>2023-09-06 10:27:14 +0200
commitb956f0ffd2497f2cacd54a6a818a0d466b30e2d5 (patch)
tree96119f4781ae80210c3f95252891d35dd1f7538c
parent33b05ce7ebc96b8ef14e23772ab5734fc57c5aa1 (diff)
parent6354dce7ea1b9fdcee344bd9a484988a06b02382 (diff)
downloadnextcloud-server-b956f0ffd2497f2cacd54a6a818a0d466b30e2d5.tar.gz
nextcloud-server-b956f0ffd2497f2cacd54a6a818a0d466b30e2d5.zip
Merge pull request #40200 from nextcloud/backport/39925/stable27
[stable27] fix(CardDAV): allow disabling of the system address book
-rw-r--r--apps/dav/lib/CardDAV/UserAddressBooks.php3
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;