Fix last admin check when syncing users (#34649) (#34673)

Backport #34649 by @wxiaoguang

Fix #34358

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabotandwxiaoguang authored and GitHub committed 2025-06-09 15:18:44 -07:00
1 parent b947bc4363
commit a3b25436f2
8 files changed
+49 -20

No files matched your search

+1 -1
View File
@@ -431,7 +431,7 @@ func EditUserPost(ctx *context.Context) {
Website: optional.Some(form.Website),
Location: optional.Some(form.Location),
IsActive: optional.Some(form.Active),
IsAdmin: optional.Some(form.Admin),
IsAdmin: user_service.UpdateOptionFieldFromValue(form.Admin),
AllowGitHook: optional.Some(form.AllowGitHook),
AllowImportLocal: optional.Some(form.AllowImportLocal),
MaxRepoCreation: optional.Some(form.MaxRepoCreation),