diff options
Diffstat (limited to 'ipalib/plugins')
-rw-r--r-- | ipalib/plugins/migration.py | 3 | ||||
-rw-r--r-- | ipalib/plugins/passwd.py | 18 |
2 files changed, 13 insertions, 8 deletions
diff --git a/ipalib/plugins/migration.py b/ipalib/plugins/migration.py index 6dc99342..9f311911 100644 --- a/ipalib/plugins/migration.py +++ b/ipalib/plugins/migration.py @@ -124,7 +124,7 @@ def _pre_migrate_group(ldap, pkey, dn, entry_attrs, failed, config, ctx): def validate_ldapuri(ugettext, ldapuri): m = re.match('^ldaps?://[-\w\.]+(:\d+)?$', ldapuri) if not m: - err_msg = 'Invalid LDAP URI.' + err_msg = _('Invalid LDAP URI.') raise errors.ValidationError(name='ldap_uri', error=err_msg) @@ -171,6 +171,7 @@ class migrate_ds(Command): ), Password('bindpw', cli_name='password', + label=_('Password'), doc=_('bind password'), ), ) diff --git a/ipalib/plugins/passwd.py b/ipalib/plugins/passwd.py index ef515605..3d65f015 100644 --- a/ipalib/plugins/passwd.py +++ b/ipalib/plugins/passwd.py @@ -39,6 +39,7 @@ from ipalib import api, errors, util from ipalib import Command from ipalib import Str, Password from ipalib import _ +from ipalib import output class passwd(Command): @@ -54,9 +55,14 @@ class passwd(Command): autofill=True, create_default=lambda **kw: util.get_current_principal(), ), - Password('password'), + Password('password', + label=_('Password'), + ), ) + has_output = output.standard_value + msg_summary = _('Changed password for "%(value)s"') + def execute(self, principal, password): """ Execute the passwd operation. @@ -84,11 +90,9 @@ class passwd(Command): ldap.modify_password(dn, password) - return dict(result=True) - - def output_for_cli(self, textui, result, principal, password): - assert password is None - textui.print_name(self.name) - textui.print_dashed('Changed password for "%s."' % principal) + return dict( + result=True, + value=principal, + ) api.register(passwd) |