diff --git a/pkg/services/contexthandler/contexthandler.go b/pkg/services/contexthandler/contexthandler.go index b2fc142de9f..302ab8de371 100644 --- a/pkg/services/contexthandler/contexthandler.go +++ b/pkg/services/contexthandler/contexthandler.go @@ -150,9 +150,9 @@ func (h *ContextHandler) Middleware(next http.Handler) http.Handler { // Hack: set all errors on LookupTokenErr, so we can check it in auth middlewares reqContext.LookupTokenErr = err } else { - reqContext.IsSignedIn = true reqContext.UserToken = identity.SessionToken reqContext.SignedInUser = identity.SignedInUser() + reqContext.IsSignedIn = !identity.IsAnonymous reqContext.AllowAnonymous = identity.IsAnonymous reqContext.IsRenderCall = identity.AuthModule == login.RenderModule }