[web/schemaviewer] fix bad call stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Tue, 04 May 2010 15:30:20 +0200
branchstable
changeset 5460 52ae8f68d9e2
parent 5459 6e561796804c
child 5461 68c51466a685
[web/schemaviewer] fix bad call
doc/book/en/devweb/edition/form.rst
web/schemaviewer.py
--- a/web/schemaviewer.py	Tue May 04 11:09:18 2010 +0200
+++ b/web/schemaviewer.py	Tue May 04 15:30:20 2010 +0200
@@ -48,13 +48,13 @@
 
     # no self.req managements
 
-    def may_read(self, rdef, action):
+    def may_read(self, rdef, action='read'):
         """Return true if request user may read the given schema.
         Always return True when no request is provided.
         """
         if self.req is None:
             return True
-        return sch.may_have_permission('read', self.req)
+        return rdef.may_have_permission(action, self.req)
 
     def format_eschema(self, eschema):
         text = eschema.type