]> source.dussan.org Git - gitea.git/commitdiff
make openid support default false for compitable with v1.1 (#1650)
authorLunny Xiao <xiaolunwen@gmail.com>
Mon, 1 May 2017 16:27:53 +0000 (00:27 +0800)
committerGitHub <noreply@github.com>
Mon, 1 May 2017 16:27:53 +0000 (00:27 +0800)
modules/setting/setting.go

index 8a2db2b4ba61a10e9722e5381cf7e0ae3b1981f5..a00db16d3a678cf2e5b682aef0e19008647cd0bd 100644 (file)
@@ -995,8 +995,8 @@ func newService() {
        Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
 
        sec = Cfg.Section("openid")
-       Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(true)
-       Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration)
+       Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(false)
+       Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration && Service.EnableOpenIDSignIn)
        pats := sec.Key("WHITELISTED_URIS").Strings(" ")
        if len(pats) != 0 {
                Service.OpenIDWhitelist = make([]*regexp.Regexp, len(pats))