From 88359ac26f56f3c6dae232bb9af529b9a35c758e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 29 Mar 2017 19:42:02 +0200 Subject: Access control: collaborators are included in get_own_query for operations, context records and finds (refs #3196) --- archaeological_context_records/models.py | 1 + 1 file changed, 1 insertion(+) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index a16b4cae7..bba9c643b 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -367,6 +367,7 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms, def get_query_owns(cls, user): return (Q(operation__scientist=user.ishtaruser.person) | Q(operation__in_charge=user.ishtaruser.person) | + Q(operation__collaborators__pk=user.ishtaruser.person.pk) | Q(history_creator=user)) \ & Q(operation__end_date__isnull=True) -- cgit v1.2.3