Skip to content

Commit

Permalink
[Backend] Allow staff users to rerun submissions (#4172)
Browse files Browse the repository at this point in the history
  • Loading branch information
gchhablani authored Sep 20, 2023
1 parent 0c0f010 commit c0acdb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/jobs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1860,9 +1860,9 @@ def re_run_submission(request, submission_pk):
challenge_phase = submission.challenge_phase
challenge = challenge_phase.challenge

if not challenge.allow_participants_resubmissions and not is_user_a_host_of_challenge(request.user, challenge.pk):
if not challenge.allow_participants_resubmissions and not is_user_a_staff_or_host(request.user, challenge.pk):
response_data = {
"error": "Only challenge hosts are allowed to re-run a submission"
"error": "Only challenge hosts or admins are allowed to re-run a submission"
}
return Response(response_data, status=status.HTTP_403_FORBIDDEN)

Expand Down

0 comments on commit c0acdb5

Please sign in to comment.