--- a/web/views/schema.py Wed Nov 18 09:16:38 2009 +0100
+++ b/web/views/schema.py Thu Nov 19 12:55:47 2009 +0100
@@ -357,13 +357,11 @@
def should_display_schema(self, rschema):
return (super(RestrictedSchemaVisitorMixIn, self).should_display_schema(rschema)
- and (rschema.has_local_role('read')
- or rschema.has_perm(self.req, 'read')))
+ and rschema.may_have_permission('read', self.req))
- def should_display_attr(self, rschema):
+ def should_display_attr(self, eschema, rschema):
return (super(RestrictedSchemaVisitorMixIn, self).should_display_attr(rschema)
- and (rschema.has_local_role('read')
- or rschema.has_perm(self.req, 'read')))
+ and eschema.rdef(rschema).may_have_permission('read'))
class FullSchemaVisitor(RestrictedSchemaVisitorMixIn, s2d.FullSchemaVisitor):