diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2015-12-14 21:44:48 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2015-12-14 21:44:48 +0100 |
commit | 08811d24b0a1869322db82b65c4fbd8a35bc7327 (patch) | |
tree | e359f8b361a947954622d6d6069995ef30bd5104 /ishtar_common/views.py | |
parent | 5b5497b31e5796b1fecfc0641e337ffb8d7792a1 (diff) | |
download | Ishtar-08811d24b0a1869322db82b65c4fbd8a35bc7327.tar.bz2 Ishtar-08811d24b0a1869322db82b65c4fbd8a35bc7327.zip |
Force filtering on "own" items on selection for modification
Diffstat (limited to 'ishtar_common/views.py')
-rw-r--r-- | ishtar_common/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 79e816bcb..a18673b44 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -321,7 +321,7 @@ def get_item(model, func_name, default_name, extra_request_keys=[], """ Generic treatment of tables """ - def func(request, data_type='json', full=False, **dct): + def func(request, data_type='json', full=False, force_own=False, **dct): # check rights own = True # more restrictive by default allowed = False @@ -337,6 +337,8 @@ def get_item(model, func_name, default_name, extra_request_keys=[], if "_own_" not in perm: own = False break # max right reach + if force_own: + own = True EMPTY = '' if 'type' in dct: data_type = dct.pop('type') |