You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-08-10 22:31:47 +02:00
Fix API call
This commit is contained in:
@@ -16,6 +16,7 @@ user_fields_get = api.model('UserGet', {
|
||||
'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'),
|
||||
'enabled': fields.Boolean(description='Enable the user. When an user is disabled, the user is unable to login to the Admin GUI or webmail or access his email via IMAP/POP3 or send mail'),
|
||||
'change_pw_next_login': fields.Boolean(description='Force the user to change their password at next login'),
|
||||
'enable_imap': fields.Boolean(description='Allow email retrieval via IMAP'),
|
||||
'enable_pop': fields.Boolean(description='Allow email retrieval via POP3'),
|
||||
'allow_spoofing': fields.Boolean(description='Allow the user to spoof the sender (send email as anyone)'),
|
||||
@@ -40,6 +41,7 @@ user_fields_post = api.model('UserCreate', {
|
||||
'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'),
|
||||
'enabled': fields.Boolean(description='Enable the user. When an user is disabled, the user is unable to login to the Admin GUI or webmail or access his email via IMAP/POP3 or send mail'),
|
||||
'change_pw_next_login': fields.Boolean(description='Force the user to change their password at next login'),
|
||||
'enable_imap': fields.Boolean(description='Allow email retrieval via IMAP'),
|
||||
'enable_pop': fields.Boolean(description='Allow email retrieval via POP3'),
|
||||
'allow_spoofing': fields.Boolean(description='Allow the user to spoof the sender (send email as anyone)'),
|
||||
@@ -206,6 +208,8 @@ class User(Resource):
|
||||
user_found.global_admin = data['global_admin']
|
||||
if 'enabled' in data:
|
||||
user_found.enabled = data['enabled']
|
||||
if 'change_pw_next_login' in data:
|
||||
user_new.change_pw_next_login = data['change_pw_next_login']
|
||||
if 'enable_imap' in data:
|
||||
user_found.enable_imap = data['enable_imap']
|
||||
if 'enable_pop' in data:
|
||||
|
Reference in New Issue
Block a user