Fix #222
This commit is contained in:
parent
ddb7f55035
commit
2657f88d9a
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.4.0.0530 Alpha"
|
const APP_VER = "0.4.0.0531 Alpha"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -67,7 +67,6 @@ func NewOauthService() {
|
||||||
TokenURL: setting.OauthService.OauthInfos[name].TokenUrl,
|
TokenURL: setting.OauthService.OauthInfos[name].TokenUrl,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enabledOauths := make([]string, 0, 10)
|
enabledOauths := make([]string, 0, 10)
|
||||||
|
|
||||||
// GitHub.
|
// GitHub.
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.4.0.0530 Alpha
|
0.4.0.0531 Alpha
|
Loading…
Reference in New Issue