Commit a59ef2d9 authored by Andy Holmes's avatar Andy Holmes Committed by Yuri Konotopov

Review: restrict Reject option to reviewers

Users have been discouraged from using the Reject action on their own
extensions for quite awhile. This disrupts the diff review flow since
new submissions need to be manually checked to ensure we don't miss
buggy/malicious in a version rejected by a user.

fixes #99
parent 938063d6
Pipeline #197768 passed with stage
in 5 minutes and 24 seconds
......@@ -129,8 +129,8 @@
<option value="none" selected>No change</option>
{% if can_approve %}
<option value="approve" class="approve">Approve</option>
{% endif %}
<option value="reject" class="reject">Reject</option>
{% endif %}
<option value="wait" class="waiting">Needs reply from author</option>
</select>
<input type="submit" value="Submit">
......
......@@ -250,6 +250,8 @@ def submit_review_view(request, obj):
if newstatus is not None:
if newstatus == models.STATUS_ACTIVE and not can_approve:
return HttpResponseForbidden()
elif newstatus == models.STATUS_REJECTED and not can_approve:
return HttpResponseForbidden()
review.new_status = newstatus
version.status = newstatus
......
Markdown is supported
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