Add display of quotas
This commit is contained in:
parent
d443135155
commit
3cd14bd4b8
2 changed files with 7 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -42,6 +42,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th width="50%">Email Address</th>
|
||||
<th>Quota</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -54,6 +55,8 @@
|
|||
<tr id="user-template">
|
||||
<td class='address'>
|
||||
</td>
|
||||
<td class="quota">
|
||||
</td>
|
||||
<td class='actions'>
|
||||
<span class='privs'>
|
||||
</span>
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue