AuthN: Only mark IsSignedIn if user is not anonymous (#63833)
Contexthandler: Only mark IsSignedIn if user is not anonymous
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user