diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-07 12:56:40 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-07 12:56:40 -0400 |
commit | 9ea9818d3255e5b08293205e278240dece36687d (patch) | |
tree | 51c6a65586843082f451ee1e93082fec5784ccd2 /routers/user/user.go | |
parent | 05fb34eacdbec59fb8bcdf96c82c0855e6ec78d2 (diff) | |
download | gitea-9ea9818d3255e5b08293205e278240dece36687d.tar.gz gitea-9ea9818d3255e5b08293205e278240dece36687d.zip |
Fix issue with log in with GitHub but need more error handle after
Diffstat (limited to 'routers/user/user.go')
-rw-r--r-- | routers/user/user.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/user/user.go b/routers/user/user.go index 12f2bd8c51..f6a39b86c7 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -78,6 +78,11 @@ func SignIn(ctx *middleware.Context, form auth.LogInForm) { ctx.Data["Title"] = "Log In" if ctx.Req.Method == "GET" { + if base.OauthService != nil { + ctx.Data["OauthEnabled"] = true + ctx.Data["OauthGitHubEnabled"] = base.OauthService.GitHub.Enabled + } + // Check auto-login. userName := ctx.GetCookie(base.CookieUserName) if len(userName) == 0 { |