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>
This commit is contained in:
Daniel Kesselberg 2025-06-06 11:29:16 +02:00
parent 452b672b7b
commit 8b66f3518e
No known key found for this signature in database
GPG key ID: 4A81C29F63464E8F

View file

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