aboutsummaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2017-08-19 17:34:49 +0200
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-08-19 17:34:49 +0200
commit2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a (patch)
tree674c05386c007308c7b4033756eba7cc6536b58c /routers/install.go
parente7653a67a10483aa0e2c9cc019abe9021e8df9ce (diff)
downloadgitea-2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a.tar.gz
gitea-2c3a229a3c4cc3e86c5a1130bbd058ba78022a6a.zip
Add OpenID configuration in install page (#2276)
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index 3d051bd376..08f5d80f3b 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -108,6 +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.DisableRegistration = setting.Service.DisableRegistration
form.EnableCaptcha = setting.Service.EnableCaptcha
form.RequireSignInView = setting.Service.RequireSignInView
@@ -292,6 +294,8 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
cfg.Section("server").Key("OFFLINE_MODE").SetValue(com.ToStr(form.OfflineMode))
cfg.Section("picture").Key("DISABLE_GRAVATAR").SetValue(com.ToStr(form.DisableGravatar))
cfg.Section("picture").Key("ENABLE_FEDERATED_AVATAR").SetValue(com.ToStr(form.EnableFederatedAvatar))
+ cfg.Section("openid").Key("ENABLE_OPENID_SIGNIN").SetValue(com.ToStr(form.EnableOpenIDSignIn))
+ cfg.Section("openid").Key("ENABLE_OPENID_SIGNUP").SetValue(com.ToStr(form.EnableOpenIDSignUp))
cfg.Section("service").Key("DISABLE_REGISTRATION").SetValue(com.ToStr(form.DisableRegistration))
cfg.Section("service").Key("ENABLE_CAPTCHA").SetValue(com.ToStr(form.EnableCaptcha))
cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").SetValue(com.ToStr(form.RequireSignInView))