.
This commit is contained in:
+6
-3
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user