Skip to content

Commit b956f0f

Browse files
authored
Merge pull request #40200 from nextcloud/backport/39925/stable27
[stable27] fix(CardDAV): allow disabling of the system address book
2 parents 33b05ce + 6354dce commit b956f0f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/dav/lib/CardDAV/UserAddressBooks.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ public function getChildren() {
8888
$addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri);
8989
// add the system address book
9090
$systemAddressBook = null;
91-
if (is_string($principal) && $principal !== 'principals/system/system' && $this->carddavBackend instanceof CardDavBackend) {
91+
$systemAddressBookExposed = $this->config->getAppValue('dav', 'system_addressbook_exposed', 'yes') === 'yes';
92+
if ($systemAddressBookExposed && is_string($principal) && $principal !== 'principals/system/system' && $this->carddavBackend instanceof CardDavBackend) {
9293
$systemAddressBook = $this->carddavBackend->getAddressBooksByUri('principals/system/system', 'system');
9394
if ($systemAddressBook !== null) {
9495
$systemAddressBook['uri'] = SystemAddressbook::URI_SHARED;

0 commit comments

Comments
 (0)