Browse Source

Filter contacts from the local system addressbook - remote share with local users is not allowed

remotes/origin/comments-markallread-dav
Thomas Müller 10 years ago
parent
commit
dfb88612af
  1. 4
      apps/dav/lib/carddav/addressbookimpl.php
  2. 3
      apps/files_sharing/api/sharees.php

4
apps/dav/lib/carddav/addressbookimpl.php

@ -214,6 +214,10 @@ class AddressBookImpl implements IAddressBook {
foreach ($vCard->children as $property) {
$result[$property->name] = $property->getValue();
}
if ($this->addressBookInfo['principaluri'] === 'principals/system/system' &&
$this->addressBookInfo['uri'] === 'system') {
$result['isLocalSystemBook'] = true;
}
return $result;
}
}

3
apps/files_sharing/api/sharees.php

@ -270,6 +270,9 @@ class Sharees {
$addressBookContacts = $this->contactsManager->search($search, ['CLOUD', 'FN']);
$foundRemoteById = false;
foreach ($addressBookContacts as $contact) {
if (isset($contact['isLocalSystemBook'])) {
continue;
}
if (isset($contact['CLOUD'])) {
$cloudIds = $contact['CLOUD'];
if (!is_array($cloudIds)) {

Loading…
Cancel
Save