Require Cross Approval
This commit is contained in:
1 parent
95e40f58ac
commit
87a61690fe
1 file changed
+5
-1
+5
-1
@@ -349,8 +349,12 @@ def approveTest(request, id):
|
||||
if not profile.approver:
|
||||
raise Exception('No Approver Permissions on Account')
|
||||
|
||||
# Approve the provided test
|
||||
# Ensure cross verification is used, except for the site admin
|
||||
test = Test.objects.get(id=id)
|
||||
if test.author == profile.user.username and not profile.user.is_superuser:
|
||||
raise Exception('Cross Approval is Required')
|
||||
|
||||
# Approve the provided test
|
||||
if test.approved:
|
||||
return HttpResponseRedirect('/index/')
|
||||
test.approved = True
|
||||
|
||||
Reference in new issue
Block a user