[schema view] use rdef.ACTIONS, attribute/relation don't use the same actions permission, that causes a crash for attribute rdefs stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 10 Aug 2010 14:19:55 +0200
branchstable
changeset 6084 c764be84700d
parent 6083 8d69ef5f086a
child 6085 8a059eefac75
[schema view] use rdef.ACTIONS, attribute/relation don't use the same actions permission, that causes a crash for attribute rdefs
web/views/schema.py
--- a/web/views/schema.py	Tue Aug 10 14:16:12 2010 +0200
+++ b/web/views/schema.py	Tue Aug 10 14:19:55 2010 +0200
@@ -113,7 +113,7 @@
         perms = {}
         for rdef in rschema.rdefs.itervalues():
             rdef_perms = []
-            for action in ('read', 'add', 'delete'):
+            for action in rdef.ACTIONS:
                 groups = sorted(rdef.get_groups(action))
                 exprs = sorted(e.expression for e in rdef.get_rqlexprs(action))
                 rdef_perms.append( (action, (tuple(groups), tuple(exprs))) )