mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 01:32:13 +08:00
Login: Require user to not be signed in to get request password email (#35421)
This commit is contained in:
@ -161,6 +161,12 @@ func SnapshotPublicModeOrSignedIn(cfg *setting.Cfg) macaron.Handler {
|
||||
}
|
||||
}
|
||||
|
||||
func ReqNotSignedIn(c *models.ReqContext) {
|
||||
if c.IsSignedIn {
|
||||
c.Redirect(setting.AppSubUrl + "/")
|
||||
}
|
||||
}
|
||||
|
||||
// NoAuth creates a middleware that doesn't require any authentication.
|
||||
// If forceLogin param is set it will redirect the user to the login page.
|
||||
func NoAuth() macaron.Handler {
|
||||
|
Reference in New Issue
Block a user