diff options
-rw-r--r-- | ipaclient/remote_plugins/schema.py | 2 | ||||
-rw-r--r-- | ipalib/parameters.py | 6 | ||||
-rw-r--r-- | ipaserver/plugins/otptoken.py | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/ipaclient/remote_plugins/schema.py b/ipaclient/remote_plugins/schema.py index a215452ea..c06d6d278 100644 --- a/ipaclient/remote_plugins/schema.py +++ b/ipaclient/remote_plugins/schema.py @@ -167,7 +167,7 @@ class _SchemaPlugin(object): elif key in ('cli_metavar', 'cli_name'): kwargs[key] = str(value) - elif key == 'confirm' and issubclass(cls, Password): + elif key == 'confirm': kwargs[key] = value elif key == 'default': default = value diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 1581b7dca..6917c8d4f 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -377,6 +377,7 @@ class Param(ReadOnly): parameter is not `required` - sortorder: used to sort a list of parameters for Command. See `Command.finalize()` for further information + - confirm: if password, ask for confirmation """ # This is a dummy type so that most of the functionality of Param can be @@ -418,6 +419,7 @@ class Param(ReadOnly): ('cli_metavar', str, None), ('no_convert', bool, False), ('deprecated', bool, False), + ('confirm', bool, True), # The 'default' kwarg gets appended in Param.__init__(): # ('default', self.type, None), @@ -1511,10 +1513,6 @@ class Password(Str): password = True - kwargs = Str.kwargs + ( - ('confirm', bool, True), - ) - def _convert_scalar(self, value, index=None): if isinstance(value, (tuple, list)) and len(value) == 2: (p1, p2) = value diff --git a/ipaserver/plugins/otptoken.py b/ipaserver/plugins/otptoken.py index 56b8c911b..39012e2f9 100644 --- a/ipaserver/plugins/otptoken.py +++ b/ipaserver/plugins/otptoken.py @@ -79,10 +79,6 @@ class OTPTokenKey(Bytes): password = True - kwargs = Bytes.kwargs + ( - ('confirm', bool, True), - ) - def _convert_scalar(self, value, index=None): if isinstance(value, (tuple, list)) and len(value) == 2: (p1, p2) = value |