Skip to content

Commit

Permalink
fix: Return only administered groups of a user for subadmins
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal committed Mar 12, 2024
1 parent 9d4f954 commit 6c4e4a4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/provisioning_api/lib/Controller/AUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ protected function getUserData(string $userId, bool $includeScopes = false): ?ar
$groups = $this->groupManager->getUserGroups($targetUserObject);
$gids = [];
foreach ($groups as $group) {
if (!$this->groupManager->getSubAdmin()->isSubAdminOfGroup($currentLoggedInUser, $group)) {
continue;
};
$gids[] = $group->getGID();
}

Expand Down

0 comments on commit 6c4e4a4

Please sign in to comment.