Exemplo n.º 1
0
def lower_case_users_emails(root):  # pragma: no cover
    """Lower case users email."""
    users = find_service(root, 'principals', 'users')
    for user in users.values():
        if not IUserExtended.providedBy(user):
            return
        sheet = get_sheet(user, IUserExtended)
        sheet.set({'email': user.email.lower()})
Exemplo n.º 2
0
def lower_case_users_emails(root):  # pragma: no cover
    """Lower case users email."""
    users = find_service(root, 'principals', 'users')
    for user in users.values():
        if not IUserExtended.providedBy(user):
            return
        sheet = get_sheet(user, IUserExtended)
        sheet.set({'email': user.email.lower()})
Exemplo n.º 3
0
def lower_case_users_emails(root, registry):  # pragma: no cover
    """Lower case users email, add 'private_user_email'/'user_name' index."""
    _update_adhocracy_catalog(root)
    catalogs = find_service(root, 'catalogs')
    users = find_service(root, 'principals', 'users')
    for user in users.values():
        if not IUserExtended.providedBy(user):
            return
        sheet = registry.content.get_sheet(user, IUserExtended)
        sheet.set({'email': user.email.lower()})
        catalogs.reindex_index(user, 'private_user_email')
        catalogs.reindex_index(user, 'user_name')
Exemplo n.º 4
0
def lower_case_users_emails(root, registry):  # pragma: no cover
    """Lower case users email, add 'private_user_email'/'user_name' index."""
    _update_adhocracy_catalog(root)
    catalogs = find_service(root, 'catalogs')
    users = find_service(root, 'principals', 'users')
    for user in users.values():
        if not IUserExtended.providedBy(user):
            return
        sheet = registry.content.get_sheet(user, IUserExtended)
        sheet.set({'email': user.email.lower()})
        catalogs.reindex_index(user, 'private_user_email')
        catalogs.reindex_index(user, 'user_name')
Exemplo n.º 5
0
def lower_case_users_emails(root):  # pragma: no cover
    """Lower case users email, add 'private_user_email'/'user_name' index."""
    _update_adhocracy_catalog(root)
    catalogs = find_service(root, "catalogs")
    users = find_service(root, "principals", "users")
    for user in users.values():
        if not IUserExtended.providedBy(user):
            return
        sheet = get_sheet(user, IUserExtended)
        sheet.set({"email": user.email.lower()})
        catalogs.reindex_index(user, "private_user_email")
        catalogs.reindex_index(user, "user_name")