New settings for user model

Removed first_name and last_name in favor of full_name. Also tweaked
response handling from validation endpoint.
This commit is contained in:
2015-10-13 19:40:25 +02:00
parent f8e7e7ff12
commit 2ad8c5458a
2 changed files with 31 additions and 18 deletions

View File

@@ -13,15 +13,10 @@ PAGINATION_LIMIT = 25
users_schema = {
'first_name': {
'full_name': {
'type': 'string',
'minlength': 1,
'maxlength': 60,
},
'last_name': {
'type': 'string',
'minlength': 1,
'maxlength': 60,
'maxlength': 128,
},
'username': {
'type': 'string',
@@ -34,7 +29,7 @@ users_schema = {
'minlength': 1,
'maxlength': 60,
},
'role': {
'roles': {
'type': 'list',
'allowed': ["admin"],
'required': True,
@@ -50,6 +45,27 @@ users_schema = {
'embeddable': True
}
}
},
'auth': {
# Storage of authentication credentials (one will be able to auth with
# multiple providers on the same account)
'type': 'list',
'required': True,
'schema': {
'type': 'dict',
'schema': {
'provider': {
'type': 'string',
'allowed': ["blender-id",],
},
'user_id' : {
'type': 'string'
},
'token': {
'type': 'string'
}
}
}
}
}