Merge "Support non-default role_id_attribute"

This commit is contained in:
Jenkins 2012-12-18 16:56:10 +00:00 committed by Gerrit Code Review
commit 1a0d30bf01

View File

@ -668,7 +668,8 @@ class RoleApi(common_ldap.BaseLdap, ApiShimMixin):
if tenant_id is None:
return self._id_to_dn(role_id)
else:
return 'cn=%s,%s' % (ldap.dn.escape_dn_chars(role_id),
return '%s=%s,%s' % (self.id_attr,
ldap.dn.escape_dn_chars(role_id),
self.tenant_api._id_to_dn(tenant_id))
def get(self, id, filter=None):