aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2025-05-16 18:02:23 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-05-23 16:27:59 +0000
commit7a226807abfd090a920751d7724902cedde3bc44 (patch)
tree4e5fea238cbdf52c7e030ed4c139d011050f25e2
parent4d63308cbf5b2d4fee3a544b63d3bfb2d2938b19 (diff)
downloadnextcloud-server-backport/52914/stable30.tar.gz
nextcloud-server-backport/52914/stable30.zip
fix: hide guests group from principal backendbackport/52914/stable30
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r--apps/dav/lib/DAV/GroupPrincipalBackend.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php
index b3b2ea39177..ce8359c13b9 100644
--- a/apps/dav/lib/DAV/GroupPrincipalBackend.php
+++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php
@@ -66,8 +66,10 @@ class GroupPrincipalBackend implements BackendInterface {
$principals = [];
if ($prefixPath === self::PRINCIPAL_PREFIX) {
- foreach ($this->groupManager->search('') as $user) {
- $principals[] = $this->groupToPrincipal($user);
+ foreach ($this->groupManager->search('') as $group) {
+ if (!$group->hideFromCollaboration()) {
+ $principals[] = $this->groupToPrincipal($group);
+ }
}
}
@@ -93,7 +95,7 @@ class GroupPrincipalBackend implements BackendInterface {
$name = urldecode($elements[2]);
$group = $this->groupManager->get($name);
- if (!is_null($group)) {
+ if ($group !== null && !$group->hideFromCollaboration()) {
return $this->groupToPrincipal($group);
}