Merge pull request #52914 from nextcloud/bug/noid/hide-guests-groups

fix: hide guests group from principal backend
pull/53069/head
Daniel 2025-05-23 18:19:57 +07:00 committed by GitHub
commit 8cf03bd145
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

@ -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);
}