Commit edf9def3 authored by AdrienClairembault's avatar AdrienClairembault Committed by Johan Cwiklinski
Browse files

Use 403 for API errors on missing rights

parent bae96be6
......@@ -2662,7 +2662,7 @@ abstract class API extends CommonGLPI {
public function messageRightError($return_error = true) {
$this->returnError(__("You don't have permission to perform this action."),
401,
403,
"ERROR_RIGHT_MISSING",
false,
$return_error);
......
......@@ -915,7 +915,7 @@ abstract class APIBaseClass extends atoum {
'id' => $tickets_id,
'headers' => [
'Session-Token' => $data['session_token']]],
401,
403,
'ERROR_RIGHT_MISSING');
// try to access ticket list (we should get empty return)
......
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