misc/migration/bootstrapmigration_repository.py
changeset 4843 5f7363416765
parent 4835 13b0b96d7982
child 4944 65533aee8d0a
equal deleted inserted replaced
4835:13b0b96d7982 4843:5f7363416765
    28 
    28 
    29 elif applcubicwebversion < (3, 6, 0) and cubicwebversion >= (3, 6, 0):
    29 elif applcubicwebversion < (3, 6, 0) and cubicwebversion >= (3, 6, 0):
    30     session.set_pool()
    30     session.set_pool()
    31     permsdict = ss.deserialize_ertype_permissions(session)
    31     permsdict = ss.deserialize_ertype_permissions(session)
    32 
    32 
    33     changes = session.disable_hooks_category.add('integrity')
    33     changes = session.disable_hook_categories.add('integrity')
    34     for rschema in repo.schema.relations():
    34     for rschema in repo.schema.relations():
    35         rpermsdict = permsdict.get(rschema.eid, {})
    35         rpermsdict = permsdict.get(rschema.eid, {})
    36         for rdef in rschema.rdefs.values():
    36         for rdef in rschema.rdefs.values():
    37             for action in rdef.ACTIONS:
    37             for action in rdef.ACTIONS:
    38                 actperms = []
    38                 actperms = []
    69         'Y2 mainvars YMV, Y2 expression YEX')
    69         'Y2 mainvars YMV, Y2 expression YEX')
    70     for action in ('read', 'add', 'delete'):
    70     for action in ('read', 'add', 'delete'):
    71         drop_relation_definition('CWRType', '%s_permission' % action, 'CWGroup', commit=False)
    71         drop_relation_definition('CWRType', '%s_permission' % action, 'CWGroup', commit=False)
    72         drop_relation_definition('CWRType', '%s_permission' % action, 'RQLExpression')
    72         drop_relation_definition('CWRType', '%s_permission' % action, 'RQLExpression')
    73     if changes:
    73     if changes:
    74         session.enable_hooks_category.add(*changes)
    74         session.enable_hook_categories.add(*changes)
    75 
    75 
    76 if applcubicwebversion < (3, 4, 0) and cubicwebversion >= (3, 4, 0):
    76 if applcubicwebversion < (3, 4, 0) and cubicwebversion >= (3, 4, 0):
    77 
    77 
    78     session.set_shared_data('do-not-insert-cwuri', True)
    78     session.set_shared_data('do-not-insert-cwuri', True)
    79     deactivate_verification_hooks()
    79     deactivate_verification_hooks()