mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-20 14:00:04 +02:00
Don't discard the value of DISABLE_REGULAR_ORG_CREATION (#5886)
* Consider the configuration value of DISABLE_REGULAR_ORG_CREATION when creating a user
This commit is contained in:
parent
7933a950d0
commit
6dc2f401c9
2 changed files with 45 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue