.
This commit is contained in:
@@ -203,6 +203,9 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
Returns:
|
||||
[boolean]: True if the user has access
|
||||
"""
|
||||
if user in self.exam.get_author_objects():
|
||||
return True
|
||||
|
||||
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():
|
||||
return False
|
||||
if self.app_name == "anatomy" and not user.groups.filter(name='anatomy_checker').exists():
|
||||
@@ -224,6 +227,10 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
Returns:
|
||||
[boolean]: True if the user has access
|
||||
"""
|
||||
# If a user is an exam author they should have acccess
|
||||
if user in self.exam.get_author_objects():
|
||||
return True
|
||||
|
||||
if self.app_name == "rapids" and not user.groups.filter(name='rapid_checker').exists():
|
||||
return False
|
||||
if self.app_name == "anatomy" and not user.groups.filter(name='anatomy_checker').exists():
|
||||
|
||||
Reference in New Issue
Block a user