'email':fields.String(description='The email address of the user',example='John.Doe@example.com',attribute='_email'),
base_model={
'password':fields.String(description='PBKDF2-HMAC-SHA256 based password of the user. For more info see passlib.hash.pbkdf2_sha256',example='$pbkdf2-sha256$1$.6UI/S.nXIk8jcbdHx3Fhg$98jZicV16ODfEsEZeYPGHU3kbrUrvUEXOPimVSQDD44'),
'comment':fields.String(description='A description for the user. This description is shown on the Users page',example='my comment'),
'comment':fields.String(description='A description for the user. This description is shown on the Users page',example='my comment'),
'quota_bytes':fields.Integer(description='The maximum quota for the user’s email box in bytes',example='1000000000'),
'quota_bytes':fields.Integer(description='The maximum quota for the user’s email box in bytes',example='1000000000'),
'global_admin':fields.Boolean(description='Make the user a global administrator'),
'global_admin':fields.Boolean(description='Make the user a global administrator'),
'spam_enabled':fields.Boolean(description='Enable the spam filter'),
'spam_enabled':fields.Boolean(description='Enable the spam filter'),
'spam_mark_as_read':fields.Boolean(description='Enable marking spam mails as read'),
'spam_mark_as_read':fields.Boolean(description='Enable marking spam mails as read'),
'spam_threshold':fields.Integer(description='The user defined spam filter tolerance',example='80'),
'spam_threshold':fields.Integer(description='The user defined spam filter tolerance',example='80'),
}
user_fields_get=api.model('UserGet',{
'email':fields.String(description='The email address of the user',example='John.Doe@example.com',attribute='_email'),
'password':fields.String(description='PBKDF2-HMAC-SHA256 based password of the user. For more info see passlib.hash.pbkdf2_sha256',example='$pbkdf2-sha256$1$.6UI/S.nXIk8jcbdHx3Fhg$98jZicV16ODfEsEZeYPGHU3kbrUrvUEXOPimVSQDD44'),
}.update(base_model))
user_fields_post=api.model('UserCreate',{
'email':fields.String(description='The email address of the user',example='John.Doe@example.com',attribute='_email',required=True),
'raw_password':fields.String(description='The raw (plain text) password of the user. Mailu will hash the password using PBKDF2-HMAC-SHA256',example='secret',required=True),
}.update(base_model))
user_fields_put=api.model('UserUpdate',{
'raw_password':fields.String(description='The raw (plain text) password of the user. Mailu will hash the password using PBKDF2-HMAC-SHA256',example='secret'),
}.update(base_model))
"""
user_fields_get=api.model('UserGet',{
'email':fields.String(description='The email address of the user',example='John.Doe@example.com',attribute='_email'),
'password':fields.String(description='PBKDF2-HMAC-SHA256 based password of the user. For more info see passlib.hash.pbkdf2_sha256',example='$pbkdf2-sha256$1$.6UI/S.nXIk8jcbdHx3Fhg$98jZicV16ODfEsEZeYPGHU3kbrUrvUEXOPimVSQDD44'),