passwd: handle sort order of passwd argument on the client

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta 2016-06-20 12:40:36 +02:00
parent 5382864909
commit 71de8878bd
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,17 @@
#
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
from ipaclient.frontend import CommandOverride
from ipalib.plugable import Registry
register = Registry()
@register(override=True)
class passwd(CommandOverride):
def get_args(self):
for arg in super(passwd, self).get_args():
if arg.name == 'current_password':
arg = arg.clone(sortorder=-1)
yield arg

View File

@ -85,7 +85,6 @@ class passwd(Command):
confirm=False,
default_from=lambda principal: get_current_password(principal),
autofill=True,
sortorder=-1,
),
)