Browse Source

Fix dashboard auto-log bug

tags/v1.2.0-rc1
Unknown 12 years ago
parent
commit
d44c44987f
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      modules/middleware/auth.go
  2. +1
    -1
      web.go

+ 1
- 1
modules/middleware/auth.go View File

@@ -21,7 +21,7 @@ type ToggleOptions struct {

func Toggle(options *ToggleOptions) martini.Handler {
return func(ctx *Context) {
if options.SignOutRequire && ctx.IsSigned {
if options.SignOutRequire && ctx.IsSigned && ctx.Req.RequestURI != "/" {
ctx.Redirect("/")
return
}


+ 1
- 1
web.go View File

@@ -88,7 +88,7 @@ func runWeb(*cli.Context) {
reqSignOut := middleware.Toggle(&middleware.ToggleOptions{SignOutRequire: true})

// Routers.
m.Get("/", ignSignIn, routers.Home)
m.Get("/", reqSignIn, routers.Home)
m.Get("/issues", reqSignIn, user.Issues)
m.Get("/pulls", reqSignIn, user.Pulls)
m.Get("/stars", reqSignIn, user.Stars)


Loading…
Cancel
Save