Allow global admin to modify username.

This commit is contained in:
Gucheng Wang
2022-01-13 23:19:36 +08:00
parent fe48c38bc6
commit b91b4aec91
5 changed files with 15 additions and 4 deletions

View File

@ -140,7 +140,7 @@ class UserEditPage extends React.Component {
{Setting.getLabel(i18next.t("general:Name"), i18next.t("general:Name - Tooltip"))} :
</Col>
<Col span={22} >
<Input value={this.state.user.name} disabled={true} onChange={e => {
<Input value={this.state.user.name} disabled={!Setting.isAdminUser(this.props.account)} onChange={e => {
this.updateUserField('name', e.target.value);
}} />
</Col>