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

pull/26548/head
Agnès Toulet 5 years ago committed by GitHub
parent 1ba95183f6
commit 2e931a0ee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      public/app/features/admin/state/actions.ts

@ -211,7 +211,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 },

Loading…
Cancel
Save