.
This commit is contained in:
+2
-2
@@ -354,7 +354,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
return False
|
return False
|
||||||
if (
|
if (
|
||||||
self.app_name == "longs"
|
self.app_name == "longs"
|
||||||
and not user.groups.filter(name__in=("long_checker")).exists()
|
and not user.groups.filter(name__in=("long_checker",)).exists()
|
||||||
):
|
):
|
||||||
return False
|
return False
|
||||||
if (
|
if (
|
||||||
@@ -612,7 +612,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
if request.is_ajax() and request.method == "POST":
|
if request.is_ajax() and request.method == "POST":
|
||||||
|
|
||||||
if not self.check_user_edit_access(request.user, exam_id=pk):
|
if not self.check_user_edit_access(request.user, exam_id=pk):
|
||||||
data = {"status": "error, invalid permisions"}
|
data = {"status": "invalid permisions"}
|
||||||
return JsonResponse(data, status=400)
|
return JsonResponse(data, status=400)
|
||||||
|
|
||||||
exam = get_object_or_404(self.Exam, pk=pk)
|
exam = get_object_or_404(self.Exam, pk=pk)
|
||||||
|
|||||||
Reference in New Issue
Block a user