1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-23 18:57:23 +01:00

Add components to user interface for setting quotas

This commit is contained in:
John Supplee
2019-01-28 23:27:03 +02:00
parent 8b95fac8c5
commit ccad47937e
3 changed files with 72 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ import auth, utils, multiprocessing.pool
from mailconfig import get_mail_users, get_mail_users_ex, get_admins, add_mail_user, set_mail_password, remove_mail_user
from mailconfig import get_mail_user_privileges, add_remove_mail_user_privilege
from mailconfig import get_mail_aliases, get_mail_aliases_ex, get_mail_domains, add_mail_alias, remove_mail_alias
from mailconfig import set_mail_quota
env = utils.load_environment()
auth_service = auth.KeyAuthService()
@@ -158,6 +158,14 @@ def mail_users_add():
except ValueError as e:
return (str(e), 400)
@app.route('/mail/users/quota', methods=['POST'])
@authorized_personnel_only
def mail_users_quota():
try:
return set_mail_quota(request.form.get('email', ''), request.form.get('quota'), env)
except ValueError as e:
return (str(e), 400)
@app.route('/mail/users/password', methods=['POST'])
@authorized_personnel_only
def mail_users_password():