Set OpenID support on by default when installing new instance (#3010)
This commit is contained in:
parent
b9452c48ac
commit
67b0d2175d
2 changed files with 3 additions and 3 deletions
|
@ -1165,7 +1165,7 @@ func newService() {
|
||||||
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
|
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
|
||||||
|
|
||||||
sec = Cfg.Section("openid")
|
sec = Cfg.Section("openid")
|
||||||
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(false)
|
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(!InstallLock)
|
||||||
Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration && Service.EnableOpenIDSignIn)
|
Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration && Service.EnableOpenIDSignIn)
|
||||||
pats := sec.Key("WHITELISTED_URIS").Strings(" ")
|
pats := sec.Key("WHITELISTED_URIS").Strings(" ")
|
||||||
if len(pats) != 0 {
|
if len(pats) != 0 {
|
||||||
|
|
|
@ -108,8 +108,8 @@ func Install(ctx *context.Context) {
|
||||||
form.OfflineMode = setting.OfflineMode
|
form.OfflineMode = setting.OfflineMode
|
||||||
form.DisableGravatar = setting.DisableGravatar
|
form.DisableGravatar = setting.DisableGravatar
|
||||||
form.EnableFederatedAvatar = setting.EnableFederatedAvatar
|
form.EnableFederatedAvatar = setting.EnableFederatedAvatar
|
||||||
form.EnableOpenIDSignIn = true
|
form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn
|
||||||
form.EnableOpenIDSignUp = true
|
form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp
|
||||||
form.DisableRegistration = setting.Service.DisableRegistration
|
form.DisableRegistration = setting.Service.DisableRegistration
|
||||||
form.EnableCaptcha = setting.Service.EnableCaptcha
|
form.EnableCaptcha = setting.Service.EnableCaptcha
|
||||||
form.RequireSignInView = setting.Service.RequireSignInView
|
form.RequireSignInView = setting.Service.RequireSignInView
|
||||||
|
|
Loading…
Reference in a new issue