From 67b0d2175dd64d436ffcd95ba58677e43d206770 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 29 Nov 2017 13:47:42 +0100 Subject: [PATCH] Set OpenID support on by default when installing new instance (#3010) --- modules/setting/setting.go | 2 +- routers/install.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/setting/setting.go b/modules/setting/setting.go index d4f92dee3..9bb7da445 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -1165,7 +1165,7 @@ 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(false) + Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(!InstallLock) Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration && Service.EnableOpenIDSignIn) pats := sec.Key("WHITELISTED_URIS").Strings(" ") if len(pats) != 0 { diff --git a/routers/install.go b/routers/install.go index 427bb960f..e832f9873 100644 --- a/routers/install.go +++ b/routers/install.go @@ -108,8 +108,8 @@ func Install(ctx *context.Context) { form.OfflineMode = setting.OfflineMode form.DisableGravatar = setting.DisableGravatar form.EnableFederatedAvatar = setting.EnableFederatedAvatar - form.EnableOpenIDSignIn = true - form.EnableOpenIDSignUp = true + form.EnableOpenIDSignIn = setting.Service.EnableOpenIDSignIn + form.EnableOpenIDSignUp = setting.Service.EnableOpenIDSignUp form.DisableRegistration = setting.Service.DisableRegistration form.EnableCaptcha = setting.Service.EnableCaptcha form.RequireSignInView = setting.Service.RequireSignInView