baseldap: Return empty string when no effective rights are found
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>
This commit is contained in:
1 parent
03c25bd98e
commit
fcd2922d86
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user