$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;