Skip to content

Commit

Permalink
fixes:
Browse files Browse the repository at this point in the history
returning Forbidden in place of Conflict, superuser not need to be cheched in hasAnyPermission()
  • Loading branch information
lorisadmin committed Apr 24, 2024
1 parent e94920d commit 77cd3ff
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions modules/examiner/php/addexaminer.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,12 @@ class AddExaminer extends \NDB_Page
$user = \User::singleton();
if (!$user->hasAnyPermission(
[
'superuser',
'examiner_multisite',
'examiner_multisite'
]
)
&& !in_array($siteID, $user->getCenterIDs())
) {
return new \LORIS\Http\Response\JSON\Conflict(
return new \LORIS\Http\Response\JSON\Forbidden(
'Permission denied: You cannot assign examiner to this Site.'
);
};
Expand Down

0 comments on commit 77cd3ff

Please sign in to comment.