mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
fix: Return only administered groups of a user for subadmins
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
02dc1bcf36
commit
3c74e02682
1 changed files with 3 additions and 0 deletions
|
|
@ -137,6 +137,9 @@ abstract class AUserData extends OCSController {
|
|||
$groups = $this->groupManager->getUserGroups($targetUserObject);
|
||||
$gids = [];
|
||||
foreach ($groups as $group) {
|
||||
if (!$this->groupManager->getSubAdmin()->isSubAdminOfGroup($currentLoggedInUser, $group)) {
|
||||
continue;
|
||||
};
|
||||
$gids[] = $group->getGID();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue