Skip to content
Snippets Groups Projects
Commit b07ee61b authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

Merge branch 'fix/23892/develop' into 'develop'

[23892] Je ne peux pas déléguer des signature si j'ai pas le privilège 'admin_users' ou j'appartiens à aucun groupe

See merge request maarch/MaarchParapheur!205
parents ab04cc54 6a30321c
No related branches found
No related tags found
No related merge requests found
...@@ -222,7 +222,8 @@ class SignatureController ...@@ -222,7 +222,8 @@ class SignatureController
if ($GLOBALS['id'] != $args['id'] && !PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'manage_users'])) { if ($GLOBALS['id'] != $args['id'] && !PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'manage_users'])) {
return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']);
} }
if (!UserController::hasRightByUserId(['activeUserId' => $GLOBALS['id'], 'targetUserId' => $args['id']])) {
if (!UserController::hasRightByUserId(['activeUserId' => $GLOBALS['id'], 'targetUserId' => $args['id']]) && $GLOBALS['id'] !== $args['id']) {
return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']);
} }
......
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