fix: admin can modify user ID now

This commit is contained in:
Yang Luo 2024-02-28 18:07:53 +08:00
parent 59e07a35aa
commit ba1ddc7e50
2 changed files with 4 additions and 2 deletions

View File

@ -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")

View File

@ -350,7 +350,9 @@ class UserEditPage extends React.Component {
{Setting.getLabel("ID", i18next.t("general:ID - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.id} disabled={disabled} />
<Input value={this.state.user.id} disabled={disabled} onChange={e => {
this.updateUserField("id", e.target.value);
}} />
</Col>
</Row>
);