1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00

backported CLI options for domain command

This commit is contained in:
Dmytro Makovey 2017-09-26 14:21:50 -07:00
parent 292853fd57
commit 9f267a44ee

View File

@ -50,7 +50,10 @@ def user(localpart, domain_name, password, hash_scheme='SHA512-CRYPT'):
db.session.add(user) db.session.add(user)
db.session.commit() db.session.commit()
@manager.command @manager.option('-n','--domain_name',dest='domain_name')
@manager.option('-u','--max_users',dest='max_users')
@manager.option('-a','--max_aliases',dest='max_aliases')
@manager.option('-q','--max_quota_bytes',dest='max_quota_bytes')
def domain(domain_name, max_users=0, max_aliases=0, max_quota_bytes=0): def domain(domain_name, max_users=0, max_aliases=0, max_quota_bytes=0):
domain = models.Domain.query.get(domain_name) domain = models.Domain.query.get(domain_name)
if not domain: if not domain: