Skip to content

API /admin/users/{username} Edit an existing user is missing for allow_create_organization #4765

@EnricoFerro

Description

@EnricoFerro
  • Gitea version (or commit ref): Actual ( Probably from d67b278 )
  • Git version:
  • Operating system:
  • Database (use [x]):
    • [ x] PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • [ x] Yes
    • No
    • Not relevant
  • Log gist:

Description

In the user setting is possible to set the creation of the organization from the flag "May Create Organizations"
image

The API EDIT USER /admin/users/{username} is missing of the flag allow_create_organization in the Model that simulate this flag

Changes

This is a ( probably incomplete ) list of the files to modify (Sorry I don't know Go... :-( )
File to modify:

adding lines:

if form.AllowCreateOrganization != nil {
u.AllowCreateOrganization = *form.AllowCreateOrganization
}


"allow_import_local": {

adding lines:

"allow_create_organization": {
"type": "boolean",
"x-go-name": "AllowCreateOrganization"
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    modifies/apiThis PR adds API routes or modifies themtype/enhancementAn improvement of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions