Browse Source

Add local share if remote cloud id matches a local user ones

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v15.0.0beta1
Julius Härtl 5 years ago
parent
commit
7a65779316
No account linked to committer's email address
1 changed files with 12 additions and 2 deletions
  1. 12
    2
      lib/private/Collaboration/Collaborators/RemotePlugin.php

+ 12
- 2
lib/private/Collaboration/Collaborators/RemotePlugin.php View File

@@ -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) {

Loading…
Cancel
Save