URL: https://github.com/freeipa/freeipa/pull/444 Author: redhatrises Title: #444: Allow nsaccountlock to be searched in user-find and user-show commands Action: synchronized
To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/444/head:pr444 git checkout pr444
From 6d398d87e3cdb888a4d59ddb44c64ebfb033cfe4 Mon Sep 17 00:00:00 2001 From: Gabe <redhatri...@gmail.com> Date: Thu, 9 Feb 2017 20:43:57 -0700 Subject: [PATCH] Allow nsaccountlock to be searched in user-find command This patch provides the ability to search and find users who are enabled/disabled in `ipa user-find` command without breaking API compatibility. --- ipaserver/plugins/user.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ipaserver/plugins/user.py b/ipaserver/plugins/user.py index 1ef71d2..e9ecce5 100644 --- a/ipaserver/plugins/user.py +++ b/ipaserver/plugins/user.py @@ -780,6 +780,14 @@ class user_find(baseuser_find): ), ) + def get_options(self): + for option in super(user_find, self).get_options(): + if option.name == 'nsaccountlock': + flags = set(option.flags) + flags.remove('no_option') + option = option.clone(flags=flags) + yield option + def pre_callback(self, ldap, filter, attrs_list, base_dn, scope, *keys, **options): assert isinstance(base_dn, DN) self.pre_common_callback(ldap, filter, attrs_list, base_dn, scope,
-- 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