mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 03:50:37 -05:00
fix: hide guests group from principal backend
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
4d63308cbf
commit
7a226807ab
1 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue