This commit is contained in:
Ross
2021-10-17 18:16:51 +01:00
parent 6937b0acbe
commit a9cfa8d139
+2 -2
View File
@@ -217,7 +217,7 @@ class ExamViews(View, LoginRequiredMixin):
"""
if exam_id is not None:
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
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 exam_id is not None:
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
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():