From c89f887875cdc859e85befadca42465e6c81321e Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 3 Jan 2019 16:58:16 +0100 Subject: Permissions: fix permission for context record, operation, sites associated to a find basket --- archaeological_operations/models.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'archaeological_operations/models.py') diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index adcadccd7..d8233ba0f 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -304,6 +304,9 @@ class ArchaeologicalSite(BaseHistorizedItem, OwnPerms, ValueGetter, q = cls._construct_query_own( 'operations__context_record__base_finds__find__container__responsible__', Warehouse._get_query_owns_dicts(ishtaruser) + ) | cls._construct_query_own( + 'operations__context_record__base_finds__find__basket__', + [{"shared_with": ishtaruser, "shared_write_with": ishtaruser}] ) | cls._construct_query_own( 'operations__context_record__base_finds__find__container__location__', Warehouse._get_query_owns_dicts(ishtaruser) @@ -1170,6 +1173,9 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, ) | cls._construct_query_own( 'context_record__base_finds__find__container__location__', Warehouse._get_query_owns_dicts(ishtaruser) + ) | cls._construct_query_own( + 'context_record__base_finds__find__basket__', + [{"shared_with": ishtaruser, "shared_write_with": ishtaruser}] ) | cls._construct_query_own( '', cls._get_query_owns_dicts(ishtaruser) ) -- cgit v1.2.3