From a9cfa8d139806fc014b34e96729d4cdd3e2fe016 Mon Sep 17 00:00:00 2001 From: Ross Date: Sun, 17 Oct 2021 18:16:51 +0100 Subject: [PATCH] . --- generic/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/views.py b/generic/views.py index 609bbc8e..14eb0366 100644 --- a/generic/views.py +++ b/generic/views.py @@ -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():