mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-12-25 07:47:05 +00:00
Add display of quotas
This commit is contained in:
parent
d443135155
commit
3cd14bd4b8
@ -128,13 +128,14 @@ def get_mail_users_ex(env, with_archived=False):
|
|||||||
users = []
|
users = []
|
||||||
active_accounts = set()
|
active_accounts = set()
|
||||||
c = open_database(env)
|
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():
|
for email, privileges in c.fetchall():
|
||||||
active_accounts.add(email)
|
active_accounts.add(email)
|
||||||
|
|
||||||
user = {
|
user = {
|
||||||
"email": email,
|
"email": email,
|
||||||
"privileges": parse_privs(privileges),
|
"privileges": parse_privs(privileges),
|
||||||
|
"user": quota,
|
||||||
"status": "active",
|
"status": "active",
|
||||||
}
|
}
|
||||||
users.append(user)
|
users.append(user)
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th width="50%">Email Address</th>
|
<th width="50%">Email Address</th>
|
||||||
|
<th>Quota</th>
|
||||||
<th>Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -54,6 +55,8 @@
|
|||||||
<tr id="user-template">
|
<tr id="user-template">
|
||||||
<td class='address'>
|
<td class='address'>
|
||||||
</td>
|
</td>
|
||||||
|
<td class="quota">
|
||||||
|
</td>
|
||||||
<td class='actions'>
|
<td class='actions'>
|
||||||
<span class='privs'>
|
<span class='privs'>
|
||||||
</span>
|
</span>
|
||||||
@ -152,7 +155,8 @@ function show_users() {
|
|||||||
n2.addClass("account_" + user.status);
|
n2.addClass("account_" + user.status);
|
||||||
|
|
||||||
n.attr('data-email', user.email);
|
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);
|
n2.find('.restore_info tt').text(user.mailbox);
|
||||||
|
|
||||||
if (user.status == 'inactive') continue;
|
if (user.status == 'inactive') continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user