mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 18:54:03 +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 {
|
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")
|
columns = append(columns, "updated_time")
|
||||||
|
@ -350,7 +350,9 @@ class UserEditPage extends React.Component {
|
|||||||
{Setting.getLabel("ID", i18next.t("general:ID - Tooltip"))} :
|
{Setting.getLabel("ID", i18next.t("general:ID - Tooltip"))} :
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={22} >
|
<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>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user