diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2025-05-16 18:02:23 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2025-05-16 18:02:23 +0200 |
commit | 50a84c04d0f2405126ddb2878cb851b7c94aee11 (patch) | |
tree | cfc21a782e2aaec3fc6b9412b80bb21606357bce | |
parent | 970e11bba57248186387b2ec943ae87553295339 (diff) | |
download | nextcloud-server-bug/noid/hide-guests-groups.tar.gz nextcloud-server-bug/noid/hide-guests-groups.zip |
fix: hide guests group from principal backendbug/noid/hide-guests-groups
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
-rw-r--r-- | apps/dav/lib/DAV/GroupPrincipalBackend.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index 143fc7d69f1..ddbd64bdda1 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -50,8 +50,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); + } } } @@ -77,7 +79,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); } |