Fixes project and role checking when a user's naming attribute is not uid.
This commit is contained in:
@@ -585,10 +585,11 @@ class LdapDriver(object):
|
||||
else:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def __dn_to_uid(dn):
|
||||
def __dn_to_uid(self, dn):
|
||||
"""Convert user dn to uid"""
|
||||
return dn.split(',')[0].split('=')[1]
|
||||
query = '(objectclass=novaUser)'
|
||||
user = self.__find_object(dn, query)
|
||||
return user[FLAGS.ldap_user_id_attribute][0]
|
||||
|
||||
|
||||
class FakeLdapDriver(LdapDriver):
|
||||
|
Reference in New Issue
Block a user