Skip to content

default_user_schema missing image fields #84

@twdbben

Description

@twdbben

image_url and image_display_url are excluded from the default_user_schema, which makes it so a user cannot update their user profile image.

When I add these fields to the user schema, as below, it fixes it.

def default_user_schema():
    schema = {
        'id': [ignore_missing, ensure_str],
        'name': [not_empty, name_validator, user_name_validator,
                 ensure_str],
        'fullname': [ignore_missing, ensure_str],
        'password': [user_password_validator,
                     user_password_not_empty,
                     ignore_missing, ensure_str],
        'password_hash': [ignore_missing, ignore_not_sysadmin,
                          ensure_str],
        'email': [not_empty, ensure_str],
        'about': [ignore_missing, user_about_validator, ensure_str],
        'created': [ignore],
        'openid': [ignore_missing],
        'sysadmin': [ignore_missing, ignore_not_sysadmin],
        'apikey': [ignore],
        'reset_key': [ignore],
        'activity_streams_email_notifications': [ignore_missing],
        'state': [ignore_missing],
        'image_url': [ignore_missing, unicode_safe],
        'image_display_url': [ignore_missing, unicode_safe],
    }

Is an intentional choice to exclude these fields from the user schema?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions