diff options
author | Rob Crittenden <rcritten@redhat.com> | 2010-12-03 13:07:22 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2010-12-03 13:51:01 -0500 |
commit | 0ca29095a8277b32e964bb59af2577d1df0ff6b9 (patch) | |
tree | e42ca0fefde22baadeb8f3607620d5fc74f116a7 | |
parent | 8a63315ef30ac1a8fdab1394601cd588a105f66d (diff) | |
download | freeipa-0ca29095a8277b32e964bb59af2577d1df0ff6b9.tar.gz freeipa-0ca29095a8277b32e964bb59af2577d1df0ff6b9.tar.xz freeipa-0ca29095a8277b32e964bb59af2577d1df0ff6b9.zip |
Don't look up the CoS entry with the global password policy.
ticket 523
-rw-r--r-- | ipalib/plugins/pwpolicy.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/pwpolicy.py b/ipalib/plugins/pwpolicy.py index f1e708e71..a9d479cf3 100644 --- a/ipalib/plugins/pwpolicy.py +++ b/ipalib/plugins/pwpolicy.py @@ -419,7 +419,7 @@ class pwpolicy_show(LDAPRetrieve): def post_callback(self, ldap, dn, entry_attrs, *keys, **options): if not options.get('raw', False): - if keys[-1] is not None: + if keys[-1] is not None and keys[-1] != 'global_policy': try: cos_entry = self.api.Command.cosentry_show( keys[-1] @@ -429,7 +429,7 @@ class pwpolicy_show(LDAPRetrieve): except errors.NotFound: pass if options.get('rights', False) and options.get('all', False) and \ - keys[-1] is not None: + (keys[-1] is not None and keys[-1] != 'global_policy'): cos_entry = self.api.Command.cosentry_show(keys[-1], rights=True, all=True)['result'] entry_attrs['attributelevelrights']['cospriority'] = cos_entry['attributelevelrights']['cospriority'] self.obj.convert_time_for_output(entry_attrs, **options) |