Merge pull request #39925 from nextcloud/fix/carddav/disable-sab

This commit is contained in:
John Molakvoæ 2023-09-01 18:01:06 +02:00 committed by GitHub
commit b0fae951e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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