aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2023-09-01 18:01:06 +0200
committerGitHub <noreply@github.com>2023-09-01 18:01:06 +0200
commitb0fae951e36976aff1fc606248112f6f495e7359 (patch)
treeef7bc3a2b33998b244907a39c102c6cadcd56d44 /apps
parente3c127f046c05f8afa23d062788f0b97f9c9a079 (diff)
parent7051f1b57754b12824a52b7d7a5c55c2a939c05e (diff)
downloadnextcloud-server-b0fae951e36976aff1fc606248112f6f495e7359.tar.gz
nextcloud-server-b0fae951e36976aff1fc606248112f6f495e7359.zip
Merge pull request #39925 from nextcloud/fix/carddav/disable-sab
Diffstat (limited to 'apps')
-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 d42af7790f8..02e500acc86 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;