Filter contacts from the local system addressbook - remote share with local users is not allowed
This commit is contained in:
parent
22de25c382
commit
dfb88612af
|
@ -214,6 +214,10 @@ class AddressBookImpl implements IAddressBook {
|
||||||
foreach ($vCard->children as $property) {
|
foreach ($vCard->children as $property) {
|
||||||
$result[$property->name] = $property->getValue();
|
$result[$property->name] = $property->getValue();
|
||||||
}
|
}
|
||||||
|
if ($this->addressBookInfo['principaluri'] === 'principals/system/system' &&
|
||||||
|
$this->addressBookInfo['uri'] === 'system') {
|
||||||
|
$result['isLocalSystemBook'] = true;
|
||||||
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -270,6 +270,9 @@ class Sharees {
|
||||||
$addressBookContacts = $this->contactsManager->search($search, ['CLOUD', 'FN']);
|
$addressBookContacts = $this->contactsManager->search($search, ['CLOUD', 'FN']);
|
||||||
$foundRemoteById = false;
|
$foundRemoteById = false;
|
||||||
foreach ($addressBookContacts as $contact) {
|
foreach ($addressBookContacts as $contact) {
|
||||||
|
if (isset($contact['isLocalSystemBook'])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (isset($contact['CLOUD'])) {
|
if (isset($contact['CLOUD'])) {
|
||||||
$cloudIds = $contact['CLOUD'];
|
$cloudIds = $contact['CLOUD'];
|
||||||
if (!is_array($cloudIds)) {
|
if (!is_array($cloudIds)) {
|
||||||
|
|
Loading…
Reference in New Issue