diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-29 19:42:02 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-03-29 19:42:02 +0200 |
commit | e1ec2cc7a72a502f9c8cb42b571bdadcad003237 (patch) | |
tree | d509f42b35d7a51c7c01cae9d3d89b425c3e7a26 /archaeological_context_records/models.py | |
parent | 7e06dcca189d52e8cd2ec8b828bf59116ed8b934 (diff) | |
download | Ishtar-e1ec2cc7a72a502f9c8cb42b571bdadcad003237.tar.bz2 Ishtar-e1ec2cc7a72a502f9c8cb42b571bdadcad003237.zip |
Access control: collaborators are included in get_own_query for operations, context records and finds (refs #3196)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 1 |
1 files changed, 1 insertions, 0 deletions
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) |