web/views/schema.py
changeset 2387 ea1defea9636
parent 2381 caad2367d940
child 2436 44b2eea35efa
--- a/web/views/schema.py	Thu Jul 16 17:00:19 2009 +0200
+++ b/web/views/schema.py	Thu Jul 16 17:00:55 2009 +0200
@@ -27,7 +27,7 @@
 
 def skip_types(req):
     if int(req.form.get('skipmeta', True)):
-        return schema.SKIP_TYPES
+        return SKIP_TYPES
     return ()
 
 class ViewSchemaAction(action.Action):
@@ -191,15 +191,15 @@
 
 class RestrictedSchemaVisitorMixIn(object):
     def __init__(self, req, *args, **kwargs):
+        self.req = req
         super(RestrictedSchemaVisitorMixIn, self).__init__(*args, **kwargs)
-        self.req = req
 
-    def should_display_schema(self, schema):
-        return (super(RestrictedSchemaVisitorMixIn, self).should_display_schema(schema)
+    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'))
 
-    def should_display_attr(self, schema):
-        return (super(RestrictedSchemaVisitorMixIn, self).should_display_attr(schema)
+    def should_display_attr(self, rschema):
+        return (super(RestrictedSchemaVisitorMixIn, self).should_display_attr(rschema)
                 and rschema.has_local_role('read') or rschema.has_perm(self.req, 'read'))