Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions lib/private/Collaboration/Collaborators/LookupPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
use Psr\Log\LoggerInterface;

class LookupPlugin implements ISearchPlugin {
/** @var string remote part of the current user's cloud id */
private string $currentUserRemote;

public function __construct(
private IConfig $config,
Expand All @@ -30,7 +28,6 @@ public function __construct(
private ?TrustedServers $trustedServers,
) {
$currentUserCloudId = $userSession->getUser()->getCloudId();
$this->currentUserRemote = $cloudIdManager->resolveCloudId($currentUserCloudId)->getRemote();
}

public function search($search, $limit, $offset, ISearchResult $searchResult): bool {
Expand Down Expand Up @@ -73,9 +70,6 @@ public function search($search, $limit, $offset, ISearchResult $searchResult): b
]);
continue;
}
if ($this->currentUserRemote === $remote) {
continue;
}
$name = $lookup['name']['value'] ?? '';
$label = empty($name) ? $lookup['federationId'] : $name . ' (' . $lookup['federationId'] . ')';
$result[] = [
Expand Down
4 changes: 4 additions & 0 deletions lib/private/Collaboration/Collaborators/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function search($search, array $shareTypes, $lookup, $limit, $offset): ar
foreach ($this->pluginList[$type] as $plugin) {
/** @var ISearchPlugin $searchPlugin */
$searchPlugin = $this->container->resolve($plugin);
if ($searchPlugin instanceof UserPlugin && $lookup) {
// we are in GlobalScale, we ignore local accounts and prefer the result from lookup
continue;
}
$hasMoreResults = $searchPlugin->search($search, $limit, $offset, $searchResult) || $hasMoreResults;
}
}
Expand Down
Loading