From 7938c64a56961c871d0f2b0a39fab671df74d863 Mon Sep 17 00:00:00 2001 From: Charlie Jacomme Date: Sat, 11 Aug 2018 00:34:32 +0200 Subject: [PATCH] bug fix acl -> this system is not understanble, and is buggy --- re2o/templatetags/acl.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/re2o/templatetags/acl.py b/re2o/templatetags/acl.py index 19bd0fae..6fd00e19 100644 --- a/re2o/templatetags/acl.py +++ b/re2o/templatetags/acl.py @@ -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 )