Skip to content
Snippets Groups Projects
Commit 3689a78c authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #11644 TIME 0:10 prevent password reset if user does not have privilege

parent 2d6c4968
No related branches found
No related tags found
No related merge requests found
......@@ -532,6 +532,10 @@ class UserController
public function resetPassword(Request $request, Response $response, array $aArgs)
{
if (!PrivilegeController::hasPrivilege(['privilegeId' => 'manage_personal_data', 'userId' => $GLOBALS['id']])) {
return $response->withStatus(403)->withJson(['errors' => 'Service forbidden']);
}
$error = $this->hasUsersRights(['id' => $aArgs['id']]);
if (!empty($error['error'])) {
return $response->withStatus($error['status'])->withJson(['errors' => $error['error']]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment