1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

Fix dashboard auto-log bug

This commit is contained in:
Unknown 2014-03-24 06:50:11 -04:00
parent 137538e54b
commit d44c44987f
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ type ToggleOptions struct {
func Toggle(options *ToggleOptions) martini.Handler { func Toggle(options *ToggleOptions) martini.Handler {
return func(ctx *Context) { return func(ctx *Context) {
if options.SignOutRequire && ctx.IsSigned { if options.SignOutRequire && ctx.IsSigned && ctx.Req.RequestURI != "/" {
ctx.Redirect("/") ctx.Redirect("/")
return return
} }

2
web.go
View file

@ -88,7 +88,7 @@ func runWeb(*cli.Context) {
reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true}) reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true})
// Routers. // Routers.
m.Get("/", ignSignIn, routers.Home) m.Get("/", reqSignIn, routers.Home)
m.Get("/issues", reqSignIn, user.Issues) m.Get("/issues", reqSignIn, user.Issues)
m.Get("/pulls", reqSignIn, user.Pulls) m.Get("/pulls", reqSignIn, user.Pulls)
m.Get("/stars", reqSignIn, user.Stars) m.Get("/stars", reqSignIn, user.Stars)