From 3cd14bd4b8e1b6573b76800c173687f29be11aa0 Mon Sep 17 00:00:00 2001 From: John Supplee Date: Mon, 28 Jan 2019 16:19:36 +0200 Subject: [PATCH] Add display of quotas --- management/mailconfig.py | 3 ++- management/templates/users.html | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/management/mailconfig.py b/management/mailconfig.py index 28e1c623..469a33a3 100755 --- a/management/mailconfig.py +++ b/management/mailconfig.py @@ -128,13 +128,14 @@ def get_mail_users_ex(env, with_archived=False): users = [] active_accounts = set() c = open_database(env) - c.execute('SELECT email, privileges FROM users') + c.execute('SELECT email, privileges, quota FROM users') for email, privileges in c.fetchall(): active_accounts.add(email) user = { "email": email, "privileges": parse_privs(privileges), + "user": quota, "status": "active", } users.append(user) diff --git a/management/templates/users.html b/management/templates/users.html index dee79d42..09a66bc6 100644 --- a/management/templates/users.html +++ b/management/templates/users.html @@ -42,6 +42,7 @@ Email Address + Quota Actions @@ -54,6 +55,8 @@ + + @@ -152,7 +155,8 @@ function show_users() { n2.addClass("account_" + user.status); n.attr('data-email', user.email); - n.find('.address').text(user.email) + n.find('.address').text(user.email); + n.find('.quota').text(user.quota); n2.find('.restore_info tt').text(user.mailbox); if (user.status == 'inactive') continue;