1
0
Fork 0
forked from forgejo/forgejo

fork render

This commit is contained in:
Gogs 2014-03-19 21:57:55 +08:00
parent 0da4975f4f
commit 56af7e99a8
13 changed files with 367 additions and 83 deletions

View file

@ -13,7 +13,7 @@ func SignInRequire(redirect bool) martini.Handler {
return func(ctx *Context) {
if !ctx.IsSigned {
if redirect {
ctx.Render.Redirect("/")
ctx.Redirect("/")
}
return
} else if !ctx.User.IsActive {
@ -28,7 +28,7 @@ func SignInRequire(redirect bool) martini.Handler {
func SignOutRequire() martini.Handler {
return func(ctx *Context) {
if ctx.IsSigned {
ctx.Render.Redirect("/")
ctx.Redirect("/")
}
}
}