misc/migration/bootstrapmigration_repository.py
branchstable
changeset 7780 a1d5365fefc1
parent 7736 8767d03dab17
child 7782 40a49f4350a5
--- a/misc/migration/bootstrapmigration_repository.py	Tue Sep 13 14:41:53 2011 +0200
+++ b/misc/migration/bootstrapmigration_repository.py	Tue Sep 13 14:48:24 2011 +0200
@@ -41,6 +41,15 @@
         'FROM cw_CWSource, cw_source_relation '
         'WHERE entities.eid=cw_source_relation.eid_from AND cw_source_relation.eid_to=cw_CWSource.cw_eid')
 
+if applcubicwebversion <= (3, 14, 0) and cubicwebversion >= (3, 14, 0):
+    if 'require_permission' in schema and not 'localperms'in repo.config.cubes():
+        from cubicweb import ExecutionError
+        try:
+            add_cube('localperms', update_database=False)
+        except ImportError:
+            raise ExecutionError('In cubicweb 3.14, CWPermission and related stuff '
+                                 'has been moved to cube localperms. Install it first.')
+
 if applcubicwebversion == (3, 6, 0) and cubicwebversion >= (3, 6, 0):
     CSTRMAP = dict(rql('Any T, X WHERE X is CWConstraintType, X name T',
                        ask_confirm=False))