mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-22 18:25:47 +08:00
fix: admin can modify user ID now
This commit is contained in:
parent
59e07a35aa
commit
ba1ddc7e50
@ -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")
|
||||
|
@ -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>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user