mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-23 02:27:05 +00:00
cli script fixes were broken
This commit is contained in:
parent
826ef372b8
commit
1bff0a458f
@ -65,7 +65,7 @@ if len(sys.argv) < 2:
|
|||||||
{cli} user password user@domain.com [password]
|
{cli} user password user@domain.com [password]
|
||||||
{cli} user remove user@domain.com
|
{cli} user remove user@domain.com
|
||||||
{cli} user make-admin user@domain.com
|
{cli} user make-admin user@domain.com
|
||||||
{cli} user quota user@domain [new-quota]
|
{cli} user quota user@domain [new-quota] (get or set user quota)
|
||||||
{cli} user remove-admin user@domain.com
|
{cli} user remove-admin user@domain.com
|
||||||
{cli} user admins (lists admins)
|
{cli} user admins (lists admins)
|
||||||
{cli} user mfa show user@domain.com (shows MFA devices for user, if any)
|
{cli} user mfa show user@domain.com (shows MFA devices for user, if any)
|
||||||
@ -123,7 +123,7 @@ elif sys.argv[1] == "user" and sys.argv[2] == "admins":
|
|||||||
print(user['email'])
|
print(user['email'])
|
||||||
|
|
||||||
elif sys.argv[1] == "user" and sys.argv[2] == "quota" and len(sys.argv) == 4:
|
elif sys.argv[1] == "user" and sys.argv[2] == "quota" and len(sys.argv) == 4:
|
||||||
# Set a user's quota
|
# Get a user's quota
|
||||||
print(mgmt("/mail/users/quota?text=1&email=%s" % sys.argv[3]))
|
print(mgmt("/mail/users/quota?text=1&email=%s" % sys.argv[3]))
|
||||||
|
|
||||||
elif sys.argv[1] == "user" and sys.argv[2] == "quota" and len(sys.argv) == 5:
|
elif sys.argv[1] == "user" and sys.argv[2] == "quota" and len(sys.argv) == 5:
|
||||||
@ -154,4 +154,3 @@ elif sys.argv[1] == "alias" and sys.argv[2] == "remove" and len(sys.argv) == 4:
|
|||||||
else:
|
else:
|
||||||
print("Invalid command-line arguments.")
|
print("Invalid command-line arguments.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user