Updated patch attached. On Tue, Oct 13, 2015 at 10:59 AM, Martin Basti <mba...@redhat.com> wrote:
> > > On 13.10.2015 18:53, Gabe Alford wrote: > > Thanks Martin, > > What about adding no_create and no_update flags? > > Gabe > > Yes, that may work, also please increment minor version of API and add > ticket into commit message (https://fedorahosted.org/freeipa/ticket/5366) > <https://fedorahosted.org/freeipa/ticket/5366> > > Thanks. > Martin > > > On Tue, Oct 13, 2015 at 9:54 AM, Martin Basti <mba...@redhat.com> wrote: > >> >> >> On 09.10.2015 19:17, Gabe Alford wrote: >> >> Hello, >> >> This patch enables nsaccountlock in user.py cli. It is very handy to be >> able to search and find users with disabled/enabled accounts, etc. That >> said, I couldn't find why it was no_option in the first place, so I am not >> 100% sure if it breaks something or the reasoning behind no_option. >> >> Thanks, >> >> Gabe >> >> >> Hello, >> >> https://fedorahosted.org/freeipa/ticket/5366 >> >> This patch allows to enable/disable user via user-mod, and we do not want >> to do this, so NACK for this patch. >> I'm not sure yet how to write it in elegant way. >> >> Martin. >> > > >
From 9ff0901198bcf900789d0c3a431a2a905093548e Mon Sep 17 00:00:00 2001 From: Gabe <redhatri...@gmail.com> Date: Tue, 13 Oct 2015 11:09:29 -0600 Subject: [PATCH] Enable nsaccountlock in user.py for user-find cli usage https://fedorahosted.org/freeipa/ticket/5366 --- API.txt | 8 +++----- VERSION | 4 ++-- ipalib/plugins/user.py | 3 ++- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/API.txt b/API.txt index 4d36a9885157de13529573b3a386b4ef39eba176..9d9cf12e0f924e9a119e85bf7d51dd4646e4a5e2 100644 --- a/API.txt +++ b/API.txt @@ -5147,7 +5147,7 @@ output: Entry('result', <type 'dict'>, Gettext('A dictionary representing an LDA output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None) output: PrimaryKey('value', None, None) command: user_add -args: 1,45,3 +args: 1,44,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, required=True) option: Str('addattr*', cli_name='addattr', exclude='webui') option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -5176,7 +5176,6 @@ option: Str('manager', attribute=True, cli_name='manager', multivalue=False, req option: Str('mobile', attribute=True, cli_name='mobile', multivalue=True, required=False) option: Flag('no_members', autofill=True, default=False, exclude='webui') option: Flag('noprivate', autofill=True, cli_name='noprivate', default=False) -option: Bool('nsaccountlock', attribute=True, cli_name='nsaccountlock', multivalue=False, required=False) option: Str('ou', attribute=True, cli_name='orgunit', multivalue=False, required=False) option: Str('pager', attribute=True, cli_name='pager', multivalue=True, required=False) option: Str('postalcode', attribute=True, cli_name='postalcode', multivalue=False, required=False) @@ -5269,7 +5268,7 @@ option: Str('not_in_hbacrule*', cli_name='not_in_hbacrules', csv=True) option: Str('not_in_netgroup*', cli_name='not_in_netgroups', csv=True) option: Str('not_in_role*', cli_name='not_in_roles', csv=True) option: Str('not_in_sudorule*', cli_name='not_in_sudorules', csv=True) -option: Bool('nsaccountlock', attribute=True, autofill=False, cli_name='nsaccountlock', multivalue=False, query=True, required=False) +option: Bool('nsaccountlock', attribute=True, autofill=False, cli_name='disabled', multivalue=False, query=True, required=False) option: Str('ou', attribute=True, autofill=False, cli_name='orgunit', multivalue=False, query=True, required=False) option: Str('pager', attribute=True, autofill=False, cli_name='pager', multivalue=True, query=True, required=False) option: Flag('pkey_only?', autofill=True, default=False) @@ -5296,7 +5295,7 @@ output: ListOfEntries('result', (<type 'list'>, <type 'tuple'>), Gettext('A list output: Output('summary', (<type 'unicode'>, <type 'NoneType'>), None) output: Output('truncated', <type 'bool'>, None) command: user_mod -args: 1,46,3 +args: 1,45,3 arg: Str('uid', attribute=True, cli_name='login', maxlength=255, multivalue=False, pattern='^[a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,252}[a-zA-Z0-9_.$-]?$', primary_key=True, query=True, required=True) option: Str('addattr*', cli_name='addattr', exclude='webui') option: Flag('all', autofill=True, cli_name='all', default=False, exclude='webui') @@ -5324,7 +5323,6 @@ option: Str('mail', attribute=True, autofill=False, cli_name='email', multivalue option: Str('manager', attribute=True, autofill=False, cli_name='manager', multivalue=False, required=False) option: Str('mobile', attribute=True, autofill=False, cli_name='mobile', multivalue=True, required=False) option: Flag('no_members', autofill=True, default=False, exclude='webui') -option: Bool('nsaccountlock', attribute=True, autofill=False, cli_name='nsaccountlock', multivalue=False, required=False) option: Str('ou', attribute=True, autofill=False, cli_name='orgunit', multivalue=False, required=False) option: Str('pager', attribute=True, autofill=False, cli_name='pager', multivalue=True, required=False) option: Str('postalcode', attribute=True, autofill=False, cli_name='postalcode', multivalue=False, required=False) diff --git a/VERSION b/VERSION index e1df4694f678b1fb27da7785b94dc827f0f8f207..a797c81e93878e5dadeebe82534a589c8d614b52 100644 --- a/VERSION +++ b/VERSION @@ -90,5 +90,5 @@ IPA_DATA_VERSION=20100614120000 # # ######################################################## IPA_API_VERSION_MAJOR=2 -IPA_API_VERSION_MINOR=156 -# Last change: pvoborni - add vault container commands +IPA_API_VERSION_MINOR=157 +# Last change: galford - enable nssacountlock option in user-find diff --git a/ipalib/plugins/user.py b/ipalib/plugins/user.py index cb47cbb4869cb978f87603817033580647cc2d17..4ab03172604ceeb277505477afae73972e8489c0 100644 --- a/ipalib/plugins/user.py +++ b/ipalib/plugins/user.py @@ -340,8 +340,9 @@ class user(baseuser): takes_params = baseuser.takes_params + ( Bool('nsaccountlock?', + cli_name='disabled', label=_('Account disabled'), - flags=['no_option'], + flags=['no_create', 'no_update'], ), Bool('preserved?', label=_('Preserved user'), -- 1.8.3.1
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code