mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-23 20:03:11 +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':
|
if tag_name == 'can_view_app':
|
||||||
return acl_fct(
|
return acl_fct(
|
||||||
lambda x: (
|
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
|
None
|
||||||
),
|
),
|
||||||
False
|
False
|
||||||
|
@ -154,7 +154,7 @@ def get_callback(tag_name, obj=None):
|
||||||
if tag_name == 'cannot_view_app':
|
if tag_name == 'cannot_view_app':
|
||||||
return acl_fct(
|
return acl_fct(
|
||||||
lambda x: (
|
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
|
None
|
||||||
),
|
),
|
||||||
True
|
True
|
||||||
|
@ -171,12 +171,12 @@ def get_callback(tag_name, obj=None):
|
||||||
)
|
)
|
||||||
if tag_name == 'can_view_any_app':
|
if tag_name == 'can_view_any_app':
|
||||||
return acl_fct(
|
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
|
False
|
||||||
)
|
)
|
||||||
if tag_name == 'cannot_view_any_app':
|
if tag_name == 'cannot_view_any_app':
|
||||||
return acl_fct(
|
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
|
True
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue