server/migractions.py
changeset 4188 b3258d2afe04
parent 4099 59ff385f7348
child 4204 60256056bda6
equal deleted inserted replaced
4187:c29a49d646af 4188:b3258d2afe04
   328 
   328 
   329     # schema synchronization internals ########################################
   329     # schema synchronization internals ########################################
   330 
   330 
   331     def _synchronize_permissions(self, erschema, teid):
   331     def _synchronize_permissions(self, erschema, teid):
   332         """permission synchronization for an entity or relation type"""
   332         """permission synchronization for an entity or relation type"""
   333         if erschema in VIRTUAL_RTYPES:
       
   334             return
       
   335         assert teid, erschema
   333         assert teid, erschema
   336         if 'update' in erschema.ACTIONS or erschema.final:
   334         if 'update' in erschema.ACTIONS or erschema.final:
   337             # entity type
   335             # entity type
   338             exprtype = u'ERQLExpression'
   336             exprtype = u'ERQLExpression'
   339         else:
   337         else:
   520             # 2. add new constraints
   518             # 2. add new constraints
   521             for newcstr in newconstraints:
   519             for newcstr in newconstraints:
   522                 self.rqlexecall(ss.constraint2rql(rschema, subjtype, objtype,
   520                 self.rqlexecall(ss.constraint2rql(rschema, subjtype, objtype,
   523                                                   newcstr),
   521                                                   newcstr),
   524                                 ask_confirm=confirm)
   522                                 ask_confirm=confirm)
   525         if syncperms:
   523         if syncperms and not rschema in VIRTUAL_RTYPES:
   526             self._synchronize_permissions(rdef, repordef.eid)
   524             self._synchronize_permissions(rdef, repordef.eid)
   527 
   525 
   528     # base actions ############################################################
   526     # base actions ############################################################
   529 
   527 
   530     def checkpoint(self, ask_confirm=True):
   528     def checkpoint(self, ask_confirm=True):