]> source.dussan.org Git - nextcloud-server.git/commitdiff
Filter contacts from the local system addressbook - remote share with local users...
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 2 Feb 2016 10:24:26 +0000 (11:24 +0100)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 2 Feb 2016 10:24:26 +0000 (11:24 +0100)
apps/dav/lib/carddav/addressbookimpl.php
apps/files_sharing/api/sharees.php

index 734e68f207c9da40123f4d1cbbf5dbdc8917ef33..1d7b55c1a5d3a8c72acd005270f438f0bc572e7a 100644 (file)
@@ -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;
        }
 }
index c6bef8d784de5f06339946387941db1340b53826..85cea2e423825f6af043538757294e2ed88686f4 100644 (file)
@@ -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)) {