summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-07-08 15:22:23 +0200
committerPetr Viktorin <pviktori@redhat.com>2014-07-09 11:39:34 +0200
commitfcd2922d86b523c0fe002b515fd91f00c97b6c5b (patch)
treef260c5581ace7aca858f7ef8e99924be2dde55f1
parent03c25bd98e7fb16574a8bc0c4a9c9de851ae9bed (diff)
downloadfreeipa-master.tar.gz
freeipa-master.tar.xz
freeipa-master.zip
baseldap: Return empty string when no effective rights are foundmaster
DS returns the string "none" when no rights were found. All clients would need to special-case this value when checking the rights. Return empty string instead. https://fedorahosted.org/freeipa/ticket/4359 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
-rw-r--r--ipalib/plugins/baseldap.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ipalib/plugins/baseldap.py b/ipalib/plugins/baseldap.py
index 44302c9a7..e5a23b99f 100644
--- a/ipalib/plugins/baseldap.py
+++ b/ipalib/plugins/baseldap.py
@@ -210,6 +210,10 @@ def get_effective_rights(ldap, dn, attrs=None):
rights = rights[0].split(', ')
for r in rights:
(k,v) = r.split(':')
+ if v == 'none':
+ # the string "none" means "no rights found"
+ # see https://fedorahosted.org/freeipa/ticket/4359
+ v = ''
rdict[k.strip().lower()] = v
return rdict