diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-02-14 20:16:00 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-14 20:16:00 +0800 |
commit | d67b278a0d05e122bf510ac52bfbd69eab4f654d (patch) | |
tree | 28fe4dd05973026013666fd0320a7dea40d94109 /modules | |
parent | 23aba523b551d20ee2bbc694ae630989bcdeaccd (diff) | |
download | gitea-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.go | 7 |
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 { |