fixed bug in dialog validation for sysadmin edit user

This commit is contained in:
2026-03-22 23:00:44 -06:00
parent 8c46c000e0
commit f9b9a25002
+1 -1
View File
@@ -307,12 +307,12 @@ func UserManagementSave(ctxt ui.AmContext) (string, any) {
dlg, err := ui.AmLoadDialog("admin_user")
if err == nil {
dlg.LoadFromForm(ctxt)
dlg.SetTargetUser(user)
if ctxt.CurrentUser().BaseLevel == database.AmRole("Global.BOFH").Level() {
// only the BOFH can designate a user as a PFY!
dlg.Field("base_lvl").Param = "Global.UserLevelsPFY"
}
dlg.LoadFromForm(ctxt)
action := dlg.WhichButton(ctxt)
if action == "cancel" { // Cancel button pressed
return "redirect", "/sysadmin/users"