forked from forgejo/forgejo
parent
3634d1ee32
commit
483cc31369
13 changed files with 83 additions and 367 deletions
|
@ -13,7 +13,7 @@ func SignInRequire(redirect bool) martini.Handler {
|
|||
return func(ctx *Context) {
|
||||
if !ctx.IsSigned {
|
||||
if redirect {
|
||||
ctx.Redirect("/")
|
||||
ctx.Render.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.Redirect("/")
|
||||
ctx.Render.Redirect("/")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue