tools/mail.py should not list archived mailboxes

broken by b30d7ad80a when the API began to list both real users and archived mailboxes in the JSON response
This commit is contained in:
Joshua Tauberer 2014-08-25 08:12:48 -04:00
parent e0dc8ff04a
commit 7cec45b436
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ elif sys.argv[1] == "user" and len(sys.argv) == 2:
# Dump a list of users, one per line. Mark admins with an asterisk. # Dump a list of users, one per line. Mark admins with an asterisk.
users = mgmt("/mail/users?format=json", is_json=True) users = mgmt("/mail/users?format=json", is_json=True)
for user in users: for user in users:
if user['status'] == 'inactive': continue
print(user['email'], end='') print(user['email'], end='')
if "admin" in user['privileges']: if "admin" in user['privileges']:
print("*", end='') print("*", end='')