mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AuthProxy: Allow disabling Auth Proxy cache (#83755)
* extract auth proxy settings * simplify auth proxy methods * add doc mentions
This commit is contained in:
@@ -147,11 +147,11 @@ func (hs *HTTPServer) UpdateSignedInUser(c *contextmodel.ReqContext) response.Re
|
||||
return errResponse
|
||||
}
|
||||
|
||||
if hs.Cfg.AuthProxyEnabled {
|
||||
if hs.Cfg.AuthProxyHeaderProperty == "email" && cmd.Email != c.SignedInUser.GetEmail() {
|
||||
if hs.Cfg.AuthProxy.Enabled {
|
||||
if hs.Cfg.AuthProxy.HeaderProperty == "email" && cmd.Email != c.SignedInUser.GetEmail() {
|
||||
return response.Error(http.StatusBadRequest, "Not allowed to change email when auth proxy is using email property", nil)
|
||||
}
|
||||
if hs.Cfg.AuthProxyHeaderProperty == "username" && cmd.Login != c.SignedInUser.GetLogin() {
|
||||
if hs.Cfg.AuthProxy.HeaderProperty == "username" && cmd.Login != c.SignedInUser.GetLogin() {
|
||||
return response.Error(http.StatusBadRequest, "Not allowed to change username when auth proxy is using username property", nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user