diff options
author | Petr Viktorin <pviktori@redhat.com> | 2014-07-08 15:22:23 +0200 |
---|---|---|
committer | Petr Viktorin <pviktori@redhat.com> | 2014-07-09 11:39:34 +0200 |
commit | fcd2922d86b523c0fe002b515fd91f00c97b6c5b (patch) | |
tree | f260c5581ace7aca858f7ef8e99924be2dde55f1 | |
parent | 03c25bd98e7fb16574a8bc0c4a9c9de851ae9bed (diff) | |
download | freeipa-fcd2922d86b523c0fe002b515fd91f00c97b6c5b.tar.gz freeipa-fcd2922d86b523c0fe002b515fd91f00c97b6c5b.tar.xz freeipa-fcd2922d86b523c0fe002b515fd91f00c97b6c5b.zip |
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>
-rw-r--r-- | ipalib/plugins/baseldap.py | 4 |
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 |