Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/cmd_set_mailbox_acl.py
Show All 37 Lines | |||||
def execute(*args, **kw): | def execute(*args, **kw): | ||||
try: | try: | ||||
folder = conf.cli_args.pop(0) | folder = conf.cli_args.pop(0) | ||||
try: | try: | ||||
identifier = conf.cli_args.pop(0) | identifier = conf.cli_args.pop(0) | ||||
try: | try: | ||||
acl = conf.cli_args.pop(0) | acl = conf.cli_args.pop(0) | ||||
except IndexError, errmsg: | except IndexError: | ||||
acl = utils.ask_question(_("ACI Permissions")) | acl = utils.ask_question(_("ACI Permissions")) | ||||
except IndexError, errmsg: | except IndexError: | ||||
identifier = utils.ask_question(_("ACI Subject")) | identifier = utils.ask_question(_("ACI Subject")) | ||||
acl = utils.ask_question(_("ACI Permissions")) | acl = utils.ask_question(_("ACI Permissions")) | ||||
except IndexError, errmsg: | except IndexError: | ||||
folder = utils.ask_question(_("Folder name")) | folder = utils.ask_question(_("Folder name")) | ||||
identifier = utils.ask_question(_("ACI Subject")) | identifier = utils.ask_question(_("ACI Subject")) | ||||
acl = utils.ask_question(_("ACI Permissions")) | acl = utils.ask_question(_("ACI Permissions")) | ||||
if len(folder.split('@')) > 1: | if len(folder.split('@')) > 1: | ||||
domain = folder.split('@')[1] | domain = folder.split('@')[1] | ||||
else: | else: | ||||
domain = conf.get('kolab', 'primary_domain') | domain = conf.get('kolab', 'primary_domain') | ||||
Show All 11 Lines |