.
This commit is contained in:
+3
-1
@@ -559,10 +559,12 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@method_decorator(user_is_cid_user_manager)
|
|
||||||
def exam_cids(self, request, exam_id):
|
def exam_cids(self, request, exam_id):
|
||||||
exam = get_object_or_404(self.Exam, pk=exam_id)
|
exam = get_object_or_404(self.Exam, pk=exam_id)
|
||||||
|
|
||||||
|
if not request.user.groups.filter(name="cid_user_manager").exists():
|
||||||
|
raise PermissionDenied
|
||||||
|
|
||||||
if request.user not in exam.author.all():
|
if request.user not in exam.author.all():
|
||||||
if not self.check_user_access(request.user, exam_id):
|
if not self.check_user_access(request.user, exam_id):
|
||||||
raise PermissionDenied
|
raise PermissionDenied
|
||||||
|
|||||||
Reference in New Issue
Block a user