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 | 9b6160b263f737271a0f1aad44b02bca0a70b878 (patch) | |
| tree | e359f8b361a947954622d6d6069995ef30bd5104 /ishtar_common/views.py | |
| parent | 58dccb1cdf436f84827e20c40c96296a3778621d (diff) | |
| download | Ishtar-9b6160b263f737271a0f1aad44b02bca0a70b878.tar.bz2 Ishtar-9b6160b263f737271a0f1aad44b02bca0a70b878.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') | 
