-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API /admin/users/{username} Edit an existing user is missing for allow_create_organization #4765
Comments
I think we should also discuss aligning the API models for user creation and editing? Or am I missing a detail why these are different in the first place? |
For the creation and edit there are a lot of difference in the frontend. In the actual scenario the API follow the frontend ( without the : May Create Organization and Disable Sign-In ) CREATION:
EDIT:
|
#4775 Merged. |
[x]
):Description
In the user setting is possible to set the creation of the organization from the flag "May Create Organizations"
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:
gitea/routers/api/v1/admin/user.go
Line 157 in 6ca8fbd
adding lines:
if form.AllowCreateOrganization != nil {
u.AllowCreateOrganization = *form.AllowCreateOrganization
}
gitea/templates/swagger/v1_json.tmpl
Line 6503 in 6ca8fbd
adding lines:
"allow_create_organization": {
"type": "boolean",
"x-go-name": "AllowCreateOrganization"
},
The text was updated successfully, but these errors were encountered: