Merge pull request #53371 from nextcloud/revert-53077-backport/52914/stable31

This commit is contained in:
John Molakvoæ 2025-06-06 12:38:31 +02:00 committed by GitHub
commit 27dcaa512b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -50,10 +50,8 @@ class GroupPrincipalBackend implements BackendInterface {
$principals = [];
if ($prefixPath === self::PRINCIPAL_PREFIX) {
foreach ($this->groupManager->search('') as $group) {
if (!$group->hideFromCollaboration()) {
$principals[] = $this->groupToPrincipal($group);
}
foreach ($this->groupManager->search('') as $user) {
$principals[] = $this->groupToPrincipal($user);
}
}
@ -79,7 +77,7 @@ class GroupPrincipalBackend implements BackendInterface {
$name = urldecode($elements[2]);
$group = $this->groupManager->get($name);
if ($group !== null && !$group->hideFromCollaboration()) {
if (!is_null($group)) {
return $this->groupToPrincipal($group);
}