diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-02 11:24:26 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-02-02 11:24:26 +0100 |
commit | dfb88612af23c8367e799482ec982fcf6fe96c49 (patch) | |
tree | 29a1e5eebb8c8f1ee59f6ec77d2692cda1b49873 /apps | |
parent | 22de25c382c3eb621a351d223c1108caeb2cfde5 (diff) | |
download | nextcloud-server-dfb88612af23c8367e799482ec982fcf6fe96c49.tar.gz nextcloud-server-dfb88612af23c8367e799482ec982fcf6fe96c49.zip |
Filter contacts from the local system addressbook - remote share with local users is not allowed
Diffstat (limited to 'apps')
-rw-r--r-- | apps/dav/lib/carddav/addressbookimpl.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/api/sharees.php | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/apps/dav/lib/carddav/addressbookimpl.php b/apps/dav/lib/carddav/addressbookimpl.php index 734e68f207c..1d7b55c1a5d 100644 --- a/apps/dav/lib/carddav/addressbookimpl.php +++ b/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; } } diff --git a/apps/files_sharing/api/sharees.php b/apps/files_sharing/api/sharees.php index c6bef8d784d..85cea2e4238 100644 --- a/apps/files_sharing/api/sharees.php +++ b/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)) { |