fix: Return only administered groups of a user for subadmins

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2024-03-11 17:53:33 -07:00 committed by Pytal
parent 02dc1bcf36
commit 3c74e02682

View file

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