1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-26 09:09:36 -05:00

minor fix on auto sign in

This commit is contained in:
Unknwon 2015-11-19 00:22:16 -05:00
parent 481be9b5c9
commit ee686f6231

View file

@ -110,13 +110,13 @@ func Toggle(options *ToggleOptions) macaron.Handler {
} }
// Try auto-signin when not signed in. // Try auto-signin when not signed in.
if !ctx.IsSigned { if !options.SignOutRequire && !ctx.IsSigned && !auth.IsAPIPath(ctx.Req.URL.Path) {
succeed, err := AutoSignIn(ctx) succeed, err := AutoSignIn(ctx)
if err != nil { if err != nil {
ctx.Handle(500, "AutoSignIn", err) ctx.Handle(500, "AutoSignIn", err)
return return
} else if succeed { } else if succeed {
ctx.Redirect(ctx.Req.URL.Path) ctx.Redirect(setting.AppSubUrl + ctx.Req.RequestURI)
return return
} }
} }