check a permission has been specified first...
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Dec 2009 15:18:49 +0100
changeset 4079 27b9cdc5233c
parent 4078 3704c121624c
child 4080 f88331eb374c
check a permission has been specified first...
web/uicfg.py
--- a/web/uicfg.py	Wed Dec 09 12:52:30 2009 +0100
+++ b/web/uicfg.py	Wed Dec 09 15:18:49 2009 +0100
@@ -360,8 +360,9 @@
                 if not tag in self.etype_get(eschema, rschema, role, tschema):
                     continue
                 rdef = rschema.role_rdef(eschema, tschema, role)
-                if not ((not strict and rdef.has_local_role(permission)) or
-                        rdef.has_perm(cw, permission, fromeid=eid)):
+                if permission is not None and \
+                       not ((not strict and rdef.has_local_role(permission)) or
+                            rdef.has_perm(cw, permission, fromeid=eid)):
                     continue
                 _targetschemas.append(tschema)
             if not _targetschemas: