Commit 7938c64a authored by Charlie Jacomme's avatar Charlie Jacomme Committed by chirac

bug fix acl -> this system is not understanble, and is buggy

parent b24ef60d
......@@ -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
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment