fix: hide guests group when searching for principals

Follow-up for https://github.com/nextcloud/server/pull/52914

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/53369/head
Daniel Kesselberg 2025-06-06 11:29:16 +07:00
parent 452b672b7b
commit 8b66f3518e
No known key found for this signature in database
GPG Key ID: 4A81C29F63464E8F
1 changed files with 4 additions and 0 deletions

@ -188,6 +188,10 @@ class GroupPrincipalBackend implements BackendInterface {
$groups = $this->groupManager->search($value, $searchLimit);
$results[] = array_reduce($groups, function (array $carry, IGroup $group) use ($restrictGroups) {
if ($group->hideFromCollaboration()) {
return $carry;
}
$gid = $group->getGID();
// is sharing restricted to groups only?
if ($restrictGroups !== false) {