.
This commit is contained in:
@@ -73,6 +73,9 @@ def user_is_author_or_atlas_editor(function):
|
|||||||
|
|
||||||
def user_is_collection_author_or_atlas_editor(function):
|
def user_is_collection_author_or_atlas_editor(function):
|
||||||
def wrap(request, *args, **kwargs):
|
def wrap(request, *args, **kwargs):
|
||||||
|
if "exam_id" in kwargs:
|
||||||
|
atlas = CaseCollection.objects.get(pk=kwargs["exam_id"])
|
||||||
|
else:
|
||||||
atlas = CaseCollection.objects.get(pk=kwargs["pk"])
|
atlas = CaseCollection.objects.get(pk=kwargs["pk"])
|
||||||
if (
|
if (
|
||||||
request.user in atlas.author.all()
|
request.user in atlas.author.all()
|
||||||
|
|||||||
Reference in New Issue
Block a user