summaryrefslogtreecommitdiffstats
path: root/ipaserver/plugins/otptoken.py
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2016-08-08 13:09:39 +0200
committerDavid Kupka <dkupka@redhat.com>2016-08-10 08:51:39 +0200
commite9c1d21b9fec17ab13894885eb1238631ecc43e5 (patch)
tree1bb437d0fd79385b8b028af766bf097f80ef0a18 /ipaserver/plugins/otptoken.py
parent771dea5c6bf1cca7b3756d2f1be48f613de14ceb (diff)
downloadfreeipa-e9c1d21b9fec17ab13894885eb1238631ecc43e5.tar.gz
freeipa-e9c1d21b9fec17ab13894885eb1238631ecc43e5.tar.xz
freeipa-e9c1d21b9fec17ab13894885eb1238631ecc43e5.zip
parameters: move the `confirm` kwarg to Param
Whether a parameter is treated like password is determined by the `password` class attribute defined in the Param class. Whether the CLI will asks for confirmation of a password parameter depends on the value of the `confirm` kwarg of the Password class. Move the `confirm` kwarg from the Password class to the Param class, so that it can be used by any Param subclass which has the `password` class attribute set to True. This fixes confirmation of the --key option of otptoken-add, which is a Bytes subclass with `password` set to True. https://fedorahosted.org/freeipa/ticket/6174 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: David Kupka <dkupka@redhat.com>
Diffstat (limited to 'ipaserver/plugins/otptoken.py')
-rw-r--r--ipaserver/plugins/otptoken.py4
1 files changed, 0 insertions, 4 deletions
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