do not allow find filename if not canSeeFiles
This commit is contained in:
parent
a9d9a7ca63
commit
66c0cea928
1 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,10 @@ def parseCondition(condition, user):
|
||||||
else:
|
else:
|
||||||
return q
|
return q
|
||||||
|
|
||||||
|
if k == 'filename' and user.is_anonymous() or \
|
||||||
|
not user.get_profile().capability('canSeeFiles'):
|
||||||
|
return Q(id=0)
|
||||||
|
|
||||||
key_type = settings.CONFIG['keys'].get(k, {'type':'string'}).get('type')
|
key_type = settings.CONFIG['keys'].get(k, {'type':'string'}).get('type')
|
||||||
if isinstance(key_type, list):
|
if isinstance(key_type, list):
|
||||||
key_type = key_type[0]
|
key_type = key_type[0]
|
||||||
|
|
Loading…
Reference in a new issue