Commit 4975076e authored by Quentin Ribac's avatar Quentin Ribac
Browse files

FEAT #17436 TIME 0:30 prevent admin of certain groups from viewing users from other groups

parent 1c2a8a16
......@@ -85,10 +85,12 @@ class UserController
if (!empty($groupsIds)) {
$groups = GroupModel::get(['select' => ['label', 'id'], 'where' => ['id in (?)'], 'data' => [$groupsIds]]);
$users[$key]['groups'] = $groups;
} else {
unset($users[$key]);
}
}
return $response->withJson(['users' => $users]);
return $response->withJson(['users' => array_values($users)]);
}
public function getById(Request $request, Response $response, array $args)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment