This commit is contained in:
Ross
2021-05-01 13:05:51 +01:00
parent 1e15059517
commit a14c3ce0ee
+6 -3
View File
@@ -115,11 +115,14 @@ def generic_exam_json_edit(request):
# Only checkers can do the following
if question_type == "rapids" and not request.user.groups.filter(name='rapid_checker').exists():
raise PermissionDenied
data = {"status": "error, permission denied"}
return JsonResponse(data, status=400)
if question_type == "anatomy" and not request.user.groups.filter(name='anatomy_checker').exists():
raise PermissionDenied
data = {"status": "error, permission denied"}
return JsonResponse(data, status=400)
if question_type == "longs" and not request.user.groups.filter(name='long_checker').exists():
raise PermissionDenied
data = {"status": "error, permission denied"}
return JsonResponse(data, status=400)
if "set_open_access" in request.POST:
if request.POST.get("set_open_access") == "true":