summaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-05-08 22:51:53 +0300
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-05-08 21:51:53 +0200
commit51d0becb4232eab6b18959ccc4a895e5df30c4dc (patch)
treed119ca2bef3ca44147801cd57e4cf2190690f65a /routers/install.go
parenta85c5ab9ff60dab58b2bf713479460caac8e9567 (diff)
downloadgitea-51d0becb4232eab6b18959ccc4a895e5df30c4dc.tar.gz
gitea-51d0becb4232eab6b18959ccc4a895e5df30c4dc.zip
Add configuration option for default permission to create Organizations (#1686)
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index 1ab409d00d..57311e13a4 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -112,6 +112,7 @@ func Install(ctx *context.Context) {
form.EnableCaptcha = setting.Service.EnableCaptcha
form.RequireSignInView = setting.Service.RequireSignInView
form.DefaultKeepEmailPrivate = setting.Service.DefaultKeepEmailPrivate
+ form.DefaultAllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization
form.NoReplyAddress = setting.Service.NoReplyAddress
auth.AssignForm(form, ctx.Data)
@@ -295,6 +296,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) {
cfg.Section("service").Key("ENABLE_CAPTCHA").SetValue(com.ToStr(form.EnableCaptcha))
cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").SetValue(com.ToStr(form.RequireSignInView))
cfg.Section("service").Key("DEFAULT_KEEP_EMAIL_PRIVATE").SetValue(com.ToStr(form.DefaultKeepEmailPrivate))
+ cfg.Section("service").Key("DEFAULT_ALLOW_CREATE_ORGANIZATION").SetValue(com.ToStr(form.DefaultAllowCreateOrganization))
cfg.Section("service").Key("NO_REPLY_ADDRESS").SetValue(com.ToStr(form.NoReplyAddress))
cfg.Section("").Key("RUN_MODE").SetValue("prod")