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/53552/head
Daniel Kesselberg 2025-06-06 11:29:16 +07:00
parent 543c4d7962
commit e6b26612fa
No known key found for this signature in database
GPG Key ID: 4A81C29F63464E8F
1 changed files with 4 additions and 0 deletions

@ -204,6 +204,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) {