--- 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