add auth_type to schemas to enable updating in endpoints

This commit is contained in:
Leo Hemsted
2017-10-30 11:53:55 +00:00
parent 0ab89116ee
commit 7c8586f959
4 changed files with 73 additions and 24 deletions

View File

@@ -87,6 +87,7 @@ class UserSchema(BaseSchema):
permissions = fields.Method("user_permissions", dump_only=True)
password_changed_at = field_for(models.User, 'password_changed_at', format='%Y-%m-%d %H:%M:%S.%f')
created_at = field_for(models.User, 'created_at', format='%Y-%m-%d %H:%M:%S.%f')
auth_type = field_for(models.User, 'auth_type')
def user_permissions(self, usr):
retval = {}
@@ -505,6 +506,7 @@ class NotificationWithPersonalisationSchema(NotificationWithTemplateSchema):
class InvitedUserSchema(BaseSchema):
auth_type = field_for(models.InvitedUser, 'auth_type')
class Meta:
model = models.InvitedUser