diff --git a/src/app/user/controllers/SignatureController.php b/src/app/user/controllers/SignatureController.php index 060b20e2dfe28ea44afb8a2a2fc0883a51bc0388..b201ff3662c1fc738a099c1abf5af26696ba27c9 100755 --- a/src/app/user/controllers/SignatureController.php +++ b/src/app/user/controllers/SignatureController.php @@ -78,7 +78,7 @@ class SignatureController if ($GLOBALS['id'] != $args['id'] && !PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'manage_users'])) { return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); } - if (!UserController::hasRightByUserId(['activeUserId' => $GLOBALS['id'], 'targetUserId' => $args['id']])) { + if ($GLOBALS['id'] != $args['id'] && !UserController::hasRightByUserId(['activeUserId' => $GLOBALS['id'], 'targetUserId' => $args['id']])) { return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); } @@ -136,7 +136,7 @@ class SignatureController if ($GLOBALS['id'] != $args['id'] && !PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'manage_users'])) { return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); } - if (!UserController::hasRightByUserId(['activeUserId' => $GLOBALS['id'], 'targetUserId' => $args['id']])) { + if ($GLOBALS['id'] != $args['id'] && !UserController::hasRightByUserId(['activeUserId' => $GLOBALS['id'], 'targetUserId' => $args['id']])) { return $response->withStatus(403)->withJson(['errors' => 'Privilege forbidden']); }