diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-09-16 15:08:17 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-10-04 15:16:15 +0200 |
commit | bd227b356280f54f48bc01901275833a51f87fd7 (patch) | |
tree | 2a6746e8032067843ce020daa5c642fd46a57e29 /ipalib/parameters.py | |
parent | 28603e0c3ac20390a860347afb7a6ed976166e03 (diff) | |
download | freeipa-bd227b356280f54f48bc01901275833a51f87fd7.tar.gz freeipa-bd227b356280f54f48bc01901275833a51f87fd7.tar.xz freeipa-bd227b356280f54f48bc01901275833a51f87fd7.zip |
Require current password when using passwd to change your own password.
Add a new required parameter, current_password. In order to ask this
first I added a new parameter option, sortorder. The lower the value the
earlier it will be prompted for.
I also changed the way autofill works. It will attempt to get the default
and if it doesn't get anything will continue prompting interactively.
Since current_password is required I'm passing a magic value that
means changing someone else's password. We need to pass something
since current_password is required.
The python-ldap passwd command doesn't seem to use the old password at
all so I do a simple bind to validate it.
https://fedorahosted.org/freeipa/ticket/1808
Diffstat (limited to 'ipalib/parameters.py')
-rw-r--r-- | ipalib/parameters.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py index e7e75782a..f9e171b0e 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -317,6 +317,7 @@ class Param(ReadOnly): ('flags', frozenset, frozenset()), ('hint', (str, Gettext), None), ('alwaysask', bool, False), + ('sortorder', int, 2), # see finalize() # The 'default' kwarg gets appended in Param.__init__(): # ('default', self.type, None), |