Skip to content

Commit

Permalink
Merge pull request #27964 from nextcloud/backport/27761/stable22
Browse files Browse the repository at this point in the history
[stable22] Also hide group from direct matches
  • Loading branch information
nickvergessen committed Jul 14, 2021
2 parents a5fa6c9 + af2a862 commit c04797d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/Collaboration/Collaborators/GroupPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function search($search, $limit, $offset, ISearchResult $searchResult) {
// On page one we try if the search result has a direct hit on the
// user id and if so, we add that to the exact match list
$group = $this->groupManager->get($search);
if ($group instanceof IGroup && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) {
if ($group instanceof IGroup && !$group->hideFromCollaboration() && (!$this->shareWithGroupOnly || in_array($group->getGID(), $userGroups))) {
$result['exact'][] = [
'label' => $group->getDisplayName(),
'value' => [
Expand Down

0 comments on commit c04797d

Please sign in to comment.