mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ldap2: don't use decode() on str instance
This was causing issues when adding/removing a CA in the CA plugin. https://pagure.io/freeipa/issue/7131 Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
473ddbdb66
commit
436d2de456
@ -353,7 +353,7 @@ class ldap2(CrudBackend, LDAPClient):
|
|||||||
|
|
||||||
attrs = self.get_effective_rights(dn, ["*"])
|
attrs = self.get_effective_rights(dn, ["*"])
|
||||||
if 'entrylevelrights' in attrs:
|
if 'entrylevelrights' in attrs:
|
||||||
entry_rights = attrs['entrylevelrights'][0].decode('UTF-8')
|
entry_rights = attrs['entrylevelrights'][0]
|
||||||
if 'd' in entry_rights:
|
if 'd' in entry_rights:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@ -366,7 +366,7 @@ class ldap2(CrudBackend, LDAPClient):
|
|||||||
assert isinstance(dn, DN)
|
assert isinstance(dn, DN)
|
||||||
attrs = self.get_effective_rights(dn, ["*"])
|
attrs = self.get_effective_rights(dn, ["*"])
|
||||||
if 'entrylevelrights' in attrs:
|
if 'entrylevelrights' in attrs:
|
||||||
entry_rights = attrs['entrylevelrights'][0].decode('UTF-8')
|
entry_rights = attrs['entrylevelrights'][0]
|
||||||
if 'a' in entry_rights:
|
if 'a' in entry_rights:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user