From ba1ddc7e502c2d7de87ba5f261b8d637494368ed Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 28 Feb 2024 18:07:53 +0800 Subject: [PATCH] fix: admin can modify user ID now --- object/user.go | 2 +- web/src/UserEditPage.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/object/user.go b/object/user.go index 5efbd39a..1662d1bc 100644 --- a/object/user.go +++ b/object/user.go @@ -677,7 +677,7 @@ func UpdateUser(id string, user *User, columns []string, isAdmin bool) (bool, er } } if isAdmin { - columns = append(columns, "name", "email", "phone", "country_code", "type") + columns = append(columns, "name", "id", "email", "phone", "country_code", "type") } columns = append(columns, "updated_time") diff --git a/web/src/UserEditPage.js b/web/src/UserEditPage.js index d53cc7f3..851e4582 100644 --- a/web/src/UserEditPage.js +++ b/web/src/UserEditPage.js @@ -350,7 +350,9 @@ class UserEditPage extends React.Component { {Setting.getLabel("ID", i18next.t("general:ID - Tooltip"))} : - + { + this.updateUserField("id", e.target.value); + }} /> );