vmm
changeset 90 1734eb5101c6
parent 80 5dedc673524e
child 95 fc008eb12186
equal deleted inserted replaced
89:752d3b57ebb6 90:1734eb5101c6
    51   ada   aliasdomainadd     aliasdomain.tld    domain.tld
    51   ada   aliasdomainadd     aliasdomain.tld    domain.tld
    52   adi   aliasdomaininfo    aliasdomain.tld
    52   adi   aliasdomaininfo    aliasdomain.tld
    53   ads   aliasdomainswitch  aliasdomain.tld    domain.tld
    53   ads   aliasdomainswitch  aliasdomain.tld    domain.tld
    54   add   aliasdomaindelete  aliasdomain.tld
    54   add   aliasdomaindelete  aliasdomain.tld
    55   ua    useradd            user@domain.tld    password*
    55   ua    useradd            user@domain.tld    password*
    56   ui    userinfo           user@domain.tld    du*
    56   ui    userinfo           user@domain.tld    details*
    57   un    username           user@domain.tld    'Users Name'
    57   un    username           user@domain.tld    'Users Name'
    58   up    userpassword       user@domain.tld    password*
    58   up    userpassword       user@domain.tld    password*
    59   ut    usertransport      user@domain.tld    transport
    59   ut    usertransport      user@domain.tld    transport
    60   u0    userdisable        user@domain.tld    service*
    60   u0    userdisable        user@domain.tld    service*
    61   u1    userenable         user@domain.tld    service*
    61   u1    userenable         user@domain.tld    service*
    94     if argv[1] in ['di', 'domaininfo']:
    94     if argv[1] in ['di', 'domaininfo']:
    95         order = (('domainname', 0), ('gid', 1), ('transport', 0),
    95         order = (('domainname', 0), ('gid', 1), ('transport', 0),
    96                 ('domaindir', 0), ('aliasdomains', 0), ('accounts', 0),
    96                 ('domaindir', 0), ('aliasdomains', 0), ('accounts', 0),
    97                 ('aliases', 0), ('relocated', 0))
    97                 ('aliases', 0), ('relocated', 0))
    98     elif argv[1] in ['ui', 'userinfo']:
    98     elif argv[1] in ['ui', 'userinfo']:
    99         if argc == 4 or vmm.cfgGetBoolean('maildir', 'diskusage'):
    99         if argc == 4 and argv[3] != 'aliases'\
       
   100         or vmm.cfgGetBoolean('maildir', 'diskusage'):
   100             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
   101             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
   101                     ('transport', 0), ('maildir', 0), ('disk usage', 0),
   102                     ('transport', 0), ('maildir', 0), ('disk usage', 0),
   102                     ('smtp', 1), ('pop3', 1), ('imap', 1), ('managesieve', 1))
   103                     ('smtp', 1), ('pop3', 1), ('imap', 1), ('managesieve', 1))
   103         else:
   104         else:
   104             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
   105             order = (('address', 0), ('name', 0), ('uid', 1), ('gid', 1),
   293     if argc < 3:
   294     if argc < 3:
   294         usage(EXIT.MISSING_ARGS, _(u'Missing e-mail address.'))
   295         usage(EXIT.MISSING_ARGS, _(u'Missing e-mail address.'))
   295     elif argc < 4:
   296     elif argc < 4:
   296         _printInfo(vmm.userInfo(argv[2].lower()), 'Account')
   297         _printInfo(vmm.userInfo(argv[2].lower()), 'Account')
   297     else:
   298     else:
   298         _printInfo(vmm.userInfo(argv[2].lower(), True), 'Account')
   299         arg3 = argv[3].lower()
       
   300         info = vmm.userInfo(argv[2].lower(), arg3)
       
   301         if arg3 in ['aliases', 'full']:
       
   302             _printInfo(info[0], 'Account')
       
   303             _printList(info[1], _(u'alias addresses'))
       
   304         else:
       
   305             _printInfo(info, 'Account')
   299 
   306 
   300 def user_name():
   307 def user_name():
   301     if argc < 3:
   308     if argc < 3:
   302         usage(EXIT.MISSING_ARGS, _(u'Missing e-mail address and users name.'))
   309         usage(EXIT.MISSING_ARGS, _(u'Missing e-mail address and users name.'))
   303     if argc < 4:
   310     if argc < 4: