Tweaks to user model

Mainly checking for unique usernames.
This commit is contained in:
Francesco Siddi 2015-11-04 16:22:47 +01:00
parent e00e4698ea
commit 5f818fdc39

View File

@ -15,18 +15,19 @@ PAGINATION_LIMIT = 25
users_schema = { users_schema = {
'full_name': { 'full_name': {
'type': 'string', 'type': 'string',
'minlength': 1, 'minlength': 3,
'maxlength': 128, 'maxlength': 128,
}, },
'username': { 'username': {
'type': 'string', 'type': 'string',
'minlength': 1, 'minlength': 3,
'maxlength': 60, 'maxlength': 128,
'required': True, 'required': True,
'unique': True,
}, },
'email': { 'email': {
'type': 'string', 'type': 'string',
'minlength': 1, 'minlength': 5,
'maxlength': 60, 'maxlength': 60,
}, },
'roles': { 'roles': {