From 8b66f3518e0034bf31803b468ea49549bf843c8a Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Fri, 6 Jun 2025 11:29:16 +0200 Subject: [PATCH] fix: hide guests group when searching for principals Follow-up for https://github.com/nextcloud/server/pull/52914 Signed-off-by: Daniel Kesselberg --- apps/dav/lib/DAV/GroupPrincipalBackend.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index ddbd64bdda1..70a0099330c 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -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) {