diff options
author | Lanre Adelowo <adelowomailbox@gmail.com> | 2019-01-30 18:04:14 +0100 |
---|---|---|
committer | techknowlogick <matti@mdranta.net> | 2019-01-30 12:04:14 -0500 |
commit | 6dc2f401c9d4d07ca672d4f3a304799e70364f1b (patch) | |
tree | 8e353d2d1caf2a1b3fcd7d94c92575206b34f65b /models/user.go | |
parent | 7933a950d065d0b4399f2efc40bff75d2a7ed927 (diff) | |
download | gitea-6dc2f401c9d4d07ca672d4f3a304799e70364f1b.tar.gz gitea-6dc2f401c9d4d07ca672d4f3a304799e70364f1b.zip |
Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)
* Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when
creating a user
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/user.go b/models/user.go index 4ab78ec04e..5eb9db1e5e 100644 --- a/models/user.go +++ b/models/user.go @@ -814,6 +814,7 @@ func CreateUser(u *User) (err error) { u.AllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization u.MaxRepoCreation = -1 u.Theme = setting.UI.DefaultTheme + u.AllowCreateOrganization = !setting.Admin.DisableRegularOrgCreation if _, err = sess.Insert(u); err != nil { return err |