mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
bug fix acl -> this system is not understanble, and is buggy
This commit is contained in:
parent
b24ef60d6a
commit
7938c64a56
1 changed files with 4 additions and 4 deletions
|
@ -146,7 +146,7 @@ def get_callback(tag_name, obj=None):
|
|||
if tag_name == 'can_view_app':
|
||||
return acl_fct(
|
||||
lambda x: (
|
||||
not any(not sys.modules[o].can_view(x) for o in obj),
|
||||
not any(not sys.modules[o].can_view(x)[0] for o in obj),
|
||||
None
|
||||
),
|
||||
False
|
||||
|
@ -154,7 +154,7 @@ def get_callback(tag_name, obj=None):
|
|||
if tag_name == 'cannot_view_app':
|
||||
return acl_fct(
|
||||
lambda x: (
|
||||
not any(not sys.modules[o].can_view(x) for o in obj),
|
||||
not any(not sys.modules[o].can_view(x)[0] for o in obj),
|
||||
None
|
||||
),
|
||||
True
|
||||
|
@ -171,12 +171,12 @@ def get_callback(tag_name, obj=None):
|
|||
)
|
||||
if tag_name == 'can_view_any_app':
|
||||
return acl_fct(
|
||||
lambda x: (any(sys.modules[o].can_view(x) for o in obj), None),
|
||||
lambda x: (any(sys.modules[o].can_view(x)[0] for o in obj), None),
|
||||
False
|
||||
)
|
||||
if tag_name == 'cannot_view_any_app':
|
||||
return acl_fct(
|
||||
lambda x: (any(sys.modules[o].can_view(x) for o in obj), None),
|
||||
lambda x: (any(sys.modules[o].can_view(x)[0] for o in obj), None),
|
||||
True
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue