Refactor stuff + stricter validation for updating only ALLOWED user attrs

This commit is contained in:
Imdad Ahad
2016-11-10 13:09:25 +00:00
parent 8b64aa7e79
commit f85ee54707
3 changed files with 26 additions and 9 deletions

View File

@@ -110,8 +110,9 @@ class UserUpdateAttributeSchema(BaseSchema):
class Meta:
model = models.User
exclude = (
"updated_at", "created_at", "user_to_service",
"_password", "verify_codes")
'id', 'updated_at', 'created_at', 'user_to_service',
'_password', 'verify_codes', 'logged_in_at', 'password_changed_at',
'failed_login_count', 'state', 'platform_admin')
strict = True
@validates('name')