[v11.2.x] Identity: remove GetTypedID (#92256)

Identity: remove GetTypedID (#91745)

(cherry picked from commit bcfb66b416)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-08-22 15:53:59 +02:00
committed by GitHub
co-authored by Karl Persson
parent 7a25060fa6
commit 811307c46b
47 changed files with 211 additions and 386 deletions
@@ -35,8 +35,7 @@ func (m *UserHeaderMiddleware) applyUserHeader(ctx context.Context, h backend.Fo
}
h.DeleteHTTPHeader(proxyutil.UserHeaderName)
namespace, _ := reqCtx.SignedInUser.GetTypedID()
if namespace != identity.TypeAnonymous {
if !identity.IsIdentityType(reqCtx.SignedInUser.GetID(), identity.TypeAnonymous) {
h.SetHTTPHeader(proxyutil.UserHeaderName, reqCtx.SignedInUser.GetLogin())
}
}