|
|
@ -26,6 +26,11 @@ func SignIn(ctx *middleware.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if setting.OauthService != nil { |
|
|
|
|
|
|
|
ctx.Data["OauthEnabled"] = true |
|
|
|
|
|
|
|
ctx.Data["OauthService"] = setting.OauthService |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Check auto-login.
|
|
|
|
// Check auto-login.
|
|
|
|
userName := ctx.GetCookie(setting.CookieUserName) |
|
|
|
userName := ctx.GetCookie(setting.CookieUserName) |
|
|
|
if len(userName) == 0 { |
|
|
|
if len(userName) == 0 { |
|
|
@ -33,11 +38,6 @@ func SignIn(ctx *middleware.Context) { |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if setting.OauthService != nil { |
|
|
|
|
|
|
|
ctx.Data["OauthEnabled"] = true |
|
|
|
|
|
|
|
ctx.Data["OauthService"] = setting.OauthService |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
isSucceed := false |
|
|
|
isSucceed := false |
|
|
|
defer func() { |
|
|
|
defer func() { |
|
|
|
if !isSucceed { |
|
|
|
if !isSucceed { |
|
|
|