summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2014-05-28 11:23:20 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2014-05-28 11:23:20 +0200
commit20cc3229118c991096019c1e98da0967fc72a2a2 (patch)
tree838934d2ae466f6821bca7048ab1edaa53d2a7fa /archaeological_operations/models.py
parent2298cf58af47d7b8a5bee38555422a7d181537f8 (diff)
downloadIshtar-20cc3229118c991096019c1e98da0967fc72a2a2.tar.bz2
Ishtar-20cc3229118c991096019c1e98da0967fc72a2a2.zip
"Own" rights management (refs #1564)
* fix own queries for operations and archaeological files * fix permission checking * tests
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 97d10801c..8601c602f 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -375,7 +375,8 @@ class Operation(BaseHistorizedItem, OwnPerms, ValueGetter):
@classmethod
def get_query_owns(cls, user):
- return Q(in_charge=user.person)|Q(scientist=user.person)|\
+ return Q(in_charge=user.ishtaruser.person)|\
+ Q(scientist=user.ishtaruser.person)|\
Q(history_creator=user) & Q(end_date__isnull=True)
def is_active(self):