rschema doesn't have may_have_permission
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Dec 2009 17:51:19 +0100
changeset 4091 3fc6a53b7a6a
parent 4090 9191f6106795
child 4092 df554ae4203c
rschema doesn't have may_have_permission
web/views/owl.py
--- a/web/views/owl.py	Wed Dec 09 17:51:04 2009 +0100
+++ b/web/views/owl.py	Wed Dec 09 17:51:19 2009 +0100
@@ -72,8 +72,9 @@
             self.w(OWL_CLOSING_ROOT)
 
     def should_display_rschema(self, eschema, rschema, tschemas, role):
-        return not rschema in self.skiptypes and ( 
-            rschema.may_have_permissions('read', self._cw, eschema, role))
+        # XXX only consider tschemas[0]
+        return not rschema in self.skiptypes and (
+            eschema.rdef(rschema, role, tschemas[0]).may_have_permission('read', self._cw))
 
     def visit_schema(self, skiptypes):
         """get a layout for a whole schema"""