.
This commit is contained in:
+2
-2
@@ -217,7 +217,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
"""
|
"""
|
||||||
if exam_id is not None:
|
if exam_id is not None:
|
||||||
exam = get_object_or_404(self.Exam, pk=exam_id)
|
exam = get_object_or_404(self.Exam, pk=exam_id)
|
||||||
if user in exam.get_author_objects():
|
if exam.open_access or user in exam.get_author_objects():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():
|
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():
|
||||||
@@ -244,7 +244,7 @@ class ExamViews(View, LoginRequiredMixin):
|
|||||||
# If a user is an exam author they should have acccess
|
# If a user is an exam author they should have acccess
|
||||||
if exam_id is not None:
|
if exam_id is not None:
|
||||||
exam = get_object_or_404(self.Exam, pk=exam_id)
|
exam = get_object_or_404(self.Exam, pk=exam_id)
|
||||||
if user in exam.get_author_objects():
|
if exam.open_access or user in exam.get_author_objects():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():
|
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():
|
||||||
|
|||||||
Reference in New Issue
Block a user