summaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-10-23 09:24:04 +0200
committerJulius Härtl <jus@bitgrid.net>2018-10-30 10:19:35 +0100
commit7a65779316b275dedf689f14ce5228b64ec6cb5e (patch)
treef5d200fe562864e0de51e49bebd38db4c53cae14 /lib/private/Collaboration
parent61af60752555bb0c7f0a30cb7b7f35e7ca45fa45 (diff)
downloadnextcloud-server-7a65779316b275dedf689f14ce5228b64ec6cb5e.tar.gz
nextcloud-server-7a65779316b275dedf689f14ce5228b64ec6cb5e.zip
Add local share if remote cloud id matches a local user ones
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Collaboration')
-rw-r--r--lib/private/Collaboration/Collaborators/RemotePlugin.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/private/Collaboration/Collaborators/RemotePlugin.php b/lib/private/Collaboration/Collaborators/RemotePlugin.php
index 3da6bdeb637..abe99125512 100644
--- a/lib/private/Collaboration/Collaborators/RemotePlugin.php
+++ b/lib/private/Collaboration/Collaborators/RemotePlugin.php
@@ -88,8 +88,18 @@ class RemotePlugin implements ISearchPlugin {
}
$localUser = $this->userManager->get($remoteUser);
- if ($localUser !== null && $cloudId === $localUser->getCloudId()) {
- continue;
+ /**
+ * Add local share if remote cloud id matches a local user ones
+ */
+ if ($localUser !== null && $remoteUser !== $this->userId && $cloudId === $localUser->getCloudId() ) {
+ $result['wide'][] = [
+ 'label' => $contact['FN'],
+ 'uuid' => $contact['UID'],
+ 'value' => [
+ 'shareType' => Share::SHARE_TYPE_USER,
+ 'shareWith' => $remoteUser
+ ]
+ ];
}
if (strtolower($contact['FN']) === $lowerSearch || strtolower($cloudId) === $lowerSearch) {