summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBo-Yi Wu <appleboy.tw@gmail.com>2017-02-14 20:16:00 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-14 20:16:00 +0800
commitd67b278a0d05e122bf510ac52bfbd69eab4f654d (patch)
tree28fe4dd05973026013666fd0320a7dea40d94109 /modules
parent23aba523b551d20ee2bbc694ae630989bcdeaccd (diff)
downloadgitea-d67b278a0d05e122bf510ac52bfbd69eab4f654d.tar.gz
gitea-d67b278a0d05e122bf510ac52bfbd69eab4f654d.zip
feat: Able to disable non-admin to create new organization (#927)
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/setting.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 0e8d4a6483..583dab40fa 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -257,6 +257,11 @@ var (
FileExtensions: strings.Split(".md,.markdown,.mdown,.mkd", ","),
}
+ // Admin settings
+ Admin struct {
+ DisableRegularOrgCreation bool
+ }
+
// Picture settings
AvatarUploadPath string
GravatarSource string
@@ -855,6 +860,8 @@ please consider changing to GITEA_CUSTOM`)
log.Fatal(4, "Failed to map UI settings: %v", err)
} else if err = Cfg.Section("markdown").MapTo(&Markdown); err != nil {
log.Fatal(4, "Failed to map Markdown settings: %v", err)
+ } else if err = Cfg.Section("admin").MapTo(&Admin); err != nil {
+ log.Fatal(4, "Fail to map Admin settings: %v", err)
} else if err = Cfg.Section("cron").MapTo(&Cron); err != nil {
log.Fatal(4, "Failed to map Cron settings: %v", err)
} else if err = Cfg.Section("git").MapTo(&Git); err != nil {