diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-01-03 16:58:16 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-01-03 16:58:16 +0100 |
commit | 559d5388f0cd502da3eae25ed30cc5e005e26f76 (patch) | |
tree | 9b95b642df6e027571f2e9ad0216963a2f1ec3fc /archaeological_operations/models.py | |
parent | 70950a81ebbb1dbebc259b8226fe19d358944db6 (diff) | |
download | Ishtar-559d5388f0cd502da3eae25ed30cc5e005e26f76.tar.bz2 Ishtar-559d5388f0cd502da3eae25ed30cc5e005e26f76.zip |
Permissions: fix permission for context record, operation, sites associated to a find basket
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r-- | archaeological_operations/models.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ -305,6 +305,9 @@ class ArchaeologicalSite(BaseHistorizedItem, OwnPerms, ValueGetter, '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) ) | cls._construct_query_own( @@ -1171,6 +1174,9 @@ class Operation(ClosedItem, BaseHistorizedItem, OwnPerms, ValueGetter, '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) ) return q |