示例#1
0
def add_image_reference_to_users(root, registry):  # pragma: no cover
    """Add image reference to users and add assets service to users service."""
    users = find_service(root, 'principals', 'users')
    if not IHasAssetPool.providedBy(users):
        logger.info('Add assets service to {0}'.format(users))
        add_assets_service(users, registry, {})
    migrate_new_sheet(root, IUsersService, IHasAssetPool)
    migrate_new_sheet(root, IUser, IImageReference)
示例#2
0
def add_image_reference_to_users(root, registry):  # pragma: no cover
    """Add image reference to users and add assets service to users service."""
    users = find_service(root, 'principals', 'users')
    if not IHasAssetPool.providedBy(users):
        logger.info('Add assets service to {0}'.format(users))
        add_assets_service(users, registry, {})
    migrate_new_sheet(root, IUsersService, IHasAssetPool)
    migrate_new_sheet(root, IUser, IImageReference)
示例#3
0
def add_image_reference_to_users(root):  # pragma: no cover
    """Add image reference to users and add assets service to users service."""
    registry = get_current_registry(root)
    users = find_service(root, "principals", "users")
    if not IHasAssetPool.providedBy(users):
        logger.info("Add assets service to {0}".format(users))
        add_assets_service(users, registry, {})
    migrate_new_sheet(root, IUsersService, IHasAssetPool)
    migrate_new_sheet(root, IUser, IImageReference)
示例#4
0
def add_image_reference_to_organisations(root, registry):  # pragma: no cover
    """Add image reference to organisations and add assets service."""
    catalogs = find_service(root, 'catalogs')
    query = search_query._replace(interfaces=(IOrganisation,), resolve=True)
    organisations = catalogs.search(query).elements
    for organisation in organisations:
        if not IHasAssetPool.providedBy(organisation):
            logger.info('Add assets service to {0}'.format(organisation))
            add_assets_service(organisation, registry, {})
    migrate_new_sheet(root, IOrganisation, IHasAssetPool)
    migrate_new_sheet(root, IOrganisation, IImageReference)
示例#5
0
def add_image_reference_to_organisations(root, registry):  # pragma: no cover
    """Add image reference to organisations and add assets service."""
    catalogs = find_service(root, 'catalogs')
    query = search_query._replace(interfaces=(IOrganisation,), resolve=True)
    organisations = catalogs.search(query).elements
    for organisation in organisations:
        if not IHasAssetPool.providedBy(organisation):
            logger.info('Add assets service to {0}'.format(organisation))
            add_assets_service(organisation, registry, {})
    migrate_new_sheet(root, IOrganisation, IHasAssetPool)
    migrate_new_sheet(root, IOrganisation, IImageReference)