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 checked in hasAnyPermission()
  • Loading branch information
lorisadmin committed Apr 24, 2024
1 parent e94920d commit c13c615
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions modules/examiner/php/addexaminer.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,10 @@ class AddExaminer extends \NDB_Page

// check for site permissions
$user = \User::singleton();
if (!$user->hasAnyPermission(
[
'superuser',
'examiner_multisite',
]
)
if (!$user->hasAnyPermission('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 c13c615

Please # to comment.