diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-10-26 11:12:38 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2011-10-27 14:17:51 +0000 |
commit | a486f49a3726934f99763cc6ae93a41dafc40deb (patch) | |
tree | 23063e2a18b0fa2ff0a6aeafaee22d642cb759f6 /ipalib/plugins/permission.py | |
parent | 52981883aba2a2ce7a0152c50ad94201f327f411 (diff) | |
download | freeipa.git-a486f49a3726934f99763cc6ae93a41dafc40deb.tar.gz freeipa.git-a486f49a3726934f99763cc6ae93a41dafc40deb.tar.xz freeipa.git-a486f49a3726934f99763cc6ae93a41dafc40deb.zip |
Create pkey-only option for find commands
New option --pkey-only is available for all LDAPSearch based classes
with primary key visible in the output. This option makes LDAPSearch
commands search for primary attribute only.
This may be useful when manipulating large data sets. User can at
first retrieve all primary keys in a relatively small data package
and then run further commands with retrieved primary keys.
https://fedorahosted.org/freeipa/ticket/1262
Diffstat (limited to 'ipalib/plugins/permission.py')
-rw-r--r-- | ipalib/plugins/permission.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ipalib/plugins/permission.py b/ipalib/plugins/permission.py index 24d57c46..e51e3b85 100644 --- a/ipalib/plugins/permission.py +++ b/ipalib/plugins/permission.py @@ -352,6 +352,8 @@ class permission_find(LDAPSearch): has_output_params = LDAPSearch.has_output_params + output_params def post_callback(self, ldap, entries, truncated, *args, **options): + if options.get('pkey_only', False): + return for entry in entries: (dn, attrs) = entry try: |