let people view open access series
This commit is contained in:
+2
-1
@@ -2,11 +2,12 @@ from django.core.exceptions import PermissionDenied
|
||||
from .models import Case, CaseCollection, Series
|
||||
|
||||
|
||||
def user_is_author_or_atlas_series_checker_or_atlas_marker(function):
|
||||
def user_is_author_or_atlas_series_checker_or_atlas_marker_or_open_access(function):
|
||||
def wrap(request, *args, **kwargs):
|
||||
series = Series.objects.get(pk=kwargs["pk"])
|
||||
if (
|
||||
request.user in series.get_author_objects()
|
||||
or series.open_access
|
||||
or request.user.groups.filter(name="atlas_editor").exists()
|
||||
or request.user.groups.filter(name="atlas_marker").exists()
|
||||
or request.user.is_superuser
|
||||
|
||||
Reference in New Issue
Block a user