From 6dc2f401c9d4d07ca672d4f3a304799e70364f1b Mon Sep 17 00:00:00 2001 From: Lanre Adelowo Date: Wed, 30 Jan 2019 18:04:14 +0100 Subject: Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886) * Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when creating a user --- models/user.go | 1 + 1 file changed, 1 insertion(+) (limited to 'models/user.go') 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 -- cgit v1.2.3