mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Auth: Fix identifying rendering request (#80807)
* Auth: Fix identifying rendering request * Add comments
This commit is contained in:
parent
dafd7c7920
commit
484ced521f
@ -221,6 +221,12 @@ func (hs *HTTPServer) getUserAuthenticatedBy(c *contextmodel.ReqContext, userID
|
||||
return ""
|
||||
}
|
||||
|
||||
// Special case for image renderer. Frontend relies on this information
|
||||
// to render dashboards in a bit different way.
|
||||
if c.IsRenderCall {
|
||||
return login.RenderModule
|
||||
}
|
||||
|
||||
info, err := hs.authInfoService.GetAuthInfo(c.Req.Context(), &login.GetAuthInfoQuery{UserId: userID})
|
||||
// we ignore errors where a user does not have external user auth
|
||||
if err != nil && !errors.Is(err, user.ErrUserNotFound) {
|
||||
|
Loading…
Reference in New Issue
Block a user