LDAP: fix LDAP test with special chars in username (#26539)

(cherry picked from commit 2e931a0ee1)
This commit is contained in:
Agnès Toulet
2020-07-24 12:08:01 +02:00
committed by Leonard Gram
parent cada7a4eb8
commit 100819fe09
+1 -1
View File
@@ -210,7 +210,7 @@ export function loadLdapState(): ThunkResult<void> {
export function loadUserMapping(username: string): ThunkResult<void> {
return async dispatch => {
try {
const response = await getBackendSrv().get(`/api/admin/ldap/${username}`);
const response = await getBackendSrv().get(`/api/admin/ldap/${encodeURIComponent(username)}`);
const { name, surname, email, login, isGrafanaAdmin, isDisabled, roles, teams } = response;
const userInfo: LdapUser = {
info: { name, surname, email, login },