From fcd2922d86b523c0fe002b515fd91f00c97b6c5b Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 8 Jul 2014 15:22:23 +0200 Subject: 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 --- ipalib/plugins/baseldap.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit