diff options
author | Daniel <mail@danielkesselberg.de> | 2025-05-23 18:19:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-23 18:19:57 +0200 |
commit | 8cf03bd145ec091db11f52226149a7ead4e9fd45 (patch) | |
tree | 80da87f6ca6773be546d80376a10436997ac709d | |
parent | 166f98445a1853ff8028141217ba73b4840645f1 (diff) | |
parent | 5876653677771fc5c70c6241c96c08e18577c701 (diff) | |
download | nextcloud-server-8cf03bd145ec091db11f52226149a7ead4e9fd45.tar.gz nextcloud-server-8cf03bd145ec091db11f52226149a7ead4e9fd45.zip |
Merge pull request #52914 from nextcloud/bug/noid/hide-guests-groups
fix: hide guests group from principal backend
-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); } |