diff options
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 |
commit | 570cd2ceb82e6c65595f56f3fe27da5cd9b3d72d (patch) | |
tree | 838934d2ae466f6821bca7048ab1edaa53d2a7fa /archaeological_files | |
parent | def703c25140d71093eac192660b27f8abe33eef (diff) | |
download | Ishtar-570cd2ceb82e6c65595f56f3fe27da5cd9b3d72d.tar.bz2 Ishtar-570cd2ceb82e6c65595f56f3fe27da5cd9b3d72d.zip |
"Own" rights management (refs #1564)
* fix own queries for operations and archaeological files
* fix permission checking
* tests
Diffstat (limited to 'archaeological_files')
-rw-r--r-- | archaeological_files/models.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 297a23fed..db33ed9b2 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -228,7 +228,8 @@ class File(BaseHistorizedItem, OwnPerms, ValueGetter): @classmethod def get_query_owns(cls, user): - return (Q(history_creator=user) | Q(in_charge__ishtaruser=user)) \ + return (Q(history_creator=user) | + Q(in_charge__ishtaruser=user.ishtaruser)) \ & Q(end_date__isnull=True) def is_active(self): |