Add configuration option for default permission to create Organizations (#1686)

This commit is contained in:
Lauris BH authored and Kim "BKC" Carlbäcker committed 2017-05-08 21:51:53 +02:00
1 parent a85c5ab9ff
commit 51d0becb42
13 files changed
+27 -5

No files matched your search

+1
View File
@@ -45,6 +45,7 @@ type InstallForm struct {
EnableCaptcha bool
RequireSignInView bool
DefaultKeepEmailPrivate bool
DefaultAllowCreateOrganization bool
NoReplyAddress string
AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"`
+2
View File
@@ -972,6 +972,7 @@ var Service struct {
EnableReverseProxyAutoRegister bool
EnableCaptcha bool
DefaultKeepEmailPrivate bool
DefaultAllowCreateOrganization bool
NoReplyAddress string
// OpenID settings
@@ -992,6 +993,7 @@ func newService() {
Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool()
Service.EnableCaptcha = sec.Key("ENABLE_CAPTCHA").MustBool()
Service.DefaultKeepEmailPrivate = sec.Key("DEFAULT_KEEP_EMAIL_PRIVATE").MustBool()
Service.DefaultAllowCreateOrganization = sec.Key("DEFAULT_ALLOW_CREATE_ORGANIZATION").MustBool(true)
Service.NoReplyAddress = sec.Key("NO_REPLY_ADDRESS").MustString("noreply.example.org")
sec = Cfg.Section("openid")