fix virtual relation detection: erschema is no more a relation type but a relation def in _synchronize_permissions
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 22 Dec 2009 19:26:12 +0100
changeset 4188 b3258d2afe04
parent 4187 c29a49d646af
child 4189 bd552b341334
fix virtual relation detection: erschema is no more a relation type but a relation def in _synchronize_permissions
server/migractions.py
--- a/server/migractions.py	Tue Dec 22 19:25:08 2009 +0100
+++ b/server/migractions.py	Tue Dec 22 19:26:12 2009 +0100
@@ -330,8 +330,6 @@
 
     def _synchronize_permissions(self, erschema, teid):
         """permission synchronization for an entity or relation type"""
-        if erschema in VIRTUAL_RTYPES:
-            return
         assert teid, erschema
         if 'update' in erschema.ACTIONS or erschema.final:
             # entity type
@@ -522,7 +520,7 @@
                 self.rqlexecall(ss.constraint2rql(rschema, subjtype, objtype,
                                                   newcstr),
                                 ask_confirm=confirm)
-        if syncperms:
+        if syncperms and not rschema in VIRTUAL_RTYPES:
             self._synchronize_permissions(rdef, repordef.eid)
 
     # base actions ############################################################