Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GLPI
glpi
Commits
edf9def3
Commit
edf9def3
authored
May 03, 2021
by
AdrienClairembault
Committed by
Johan Cwiklinski
May 03, 2021
Browse files
Use 403 for API errors on missing rights
parent
bae96be6
Changes
2
Hide whitespace changes
Inline
Side-by-side
inc/api/api.class.php
View file @
edf9def3
...
...
@@ -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."
),
40
1
,
40
3
,
"ERROR_RIGHT_MISSING"
,
false
,
$return_error
);
...
...
tests/APIBaseClass.php
View file @
edf9def3
...
...
@@ -915,7 +915,7 @@ abstract class APIBaseClass extends atoum {
'id'
=>
$tickets_id
,
'headers'
=>
[
'Session-Token'
=>
$data
[
'session_token'
]]],
40
1
,
40
3
,
'ERROR_RIGHT_MISSING'
);
// try to access ticket list (we should get empty return)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment