diff options
author | Rob Crittenden <rcritten@redhat.com> | 2008-10-23 14:36:24 -0400 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2008-10-23 14:36:24 -0400 |
commit | d2b46f176e5dbc40b67ebd90e6953498c5d6249a (patch) | |
tree | aa9744362ceef772890d5ccaf5d70ea283f68387 /ipa_server | |
parent | 43ad16676f21629d399c41ef0b51a666eba4c219 (diff) | |
download | freeipa-d2b46f176e5dbc40b67ebd90e6953498c5d6249a.tar.gz freeipa-d2b46f176e5dbc40b67ebd90e6953498c5d6249a.tar.xz freeipa-d2b46f176e5dbc40b67ebd90e6953498c5d6249a.zip |
Use common display function for user-show and user-find.
Add --all option to user-find
Fix command-line help to make sense on searches as well
Diffstat (limited to 'ipa_server')
-rw-r--r-- | ipa_server/plugins/b_ldap.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ipa_server/plugins/b_ldap.py b/ipa_server/plugins/b_ldap.py index 2e9c9e9fd..a7a3c8b35 100644 --- a/ipa_server/plugins/b_ldap.py +++ b/ipa_server/plugins/b_ldap.py @@ -213,6 +213,11 @@ class ldap(CrudBackend): def search(self, **kw): objectclass = kw.get('objectclass') sfilter = kw.get('filter') + attributes = kw.get('attributes') + if attributes: + del kw['attributes'] + else: + attributes = ['*'] if objectclass: del kw['objectclass'] if sfilter: @@ -228,13 +233,13 @@ class ldap(CrudBackend): search_base = "%s, %s" % (self.api.env.container_accounts, self.api.env.basedn) try: exact_results = servercore.search(search_base, - exact_match_filter, ["*"]) + exact_match_filter, attributes) except errors.NotFound: exact_results = [0] try: partial_results = servercore.search(search_base, - partial_match_filter, ["*"]) + partial_match_filter, attributes) except errors.NotFound: partial_results = [0] |