1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-16 15:28:37 +00:00

Fix last admin check when syncing users (#34649)

Fix #34358
This commit is contained in:
wxiaoguang
2025-06-10 04:57:45 +08:00
committed by GitHub
parent 92e7e98c56
commit 0082cb51fa
8 changed files with 49 additions and 20 deletions

View File

@@ -239,7 +239,7 @@ func EditUser(ctx *context.APIContext) {
Location: optional.FromPtr(form.Location),
Description: optional.FromPtr(form.Description),
IsActive: optional.FromPtr(form.Active),
IsAdmin: optional.FromPtr(form.Admin),
IsAdmin: user_service.UpdateOptionFieldFromPtr(form.Admin),
Visibility: optional.FromNonDefault(api.VisibilityModes[form.Visibility]),
AllowGitHook: optional.FromPtr(form.AllowGitHook),
AllowImportLocal: optional.FromPtr(form.AllowImportLocal),