(cherry picked from commit 7f882eea05)
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
This commit is contained in:
co-authored by
Tobias Skarhed
parent
d86e6c072e
commit
4c274d1615
@@ -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