summaryrefslogtreecommitdiffstats
path: root/ipalib/plugins/pwpolicy.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-12-03 13:07:22 -0500
committerRob Crittenden <rcritten@redhat.com>2010-12-03 13:51:01 -0500
commit0ca29095a8277b32e964bb59af2577d1df0ff6b9 (patch)
treee42ca0fefde22baadeb8f3607620d5fc74f116a7 /ipalib/plugins/pwpolicy.py
parent8a63315ef30ac1a8fdab1394601cd588a105f66d (diff)
downloadfreeipa-0ca29095a8277b32e964bb59af2577d1df0ff6b9.tar.gz
freeipa-0ca29095a8277b32e964bb59af2577d1df0ff6b9.tar.xz
freeipa-0ca29095a8277b32e964bb59af2577d1df0ff6b9.zip
Don't look up the CoS entry with the global password policy.
ticket 523
Diffstat (limited to 'ipalib/plugins/pwpolicy.py')
-rw-r--r--ipalib/plugins/pwpolicy.py4
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)