You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-18 09:22:18 +03:00
Remove "Current Password" input if mx_pass exists
If the user is PWLU, do not show "Current Password" field in ChangePassword and when setting a new password, use the cached password.
This commit is contained in:
@ -590,6 +590,12 @@ module.exports = React.createClass({
|
||||
payload.releaseNotes
|
||||
);
|
||||
break;
|
||||
case 'password_changed':
|
||||
this.setState({
|
||||
userHasGeneratedPassword: false,
|
||||
});
|
||||
localStorage.removeItem("mx_pass");
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
@ -1176,7 +1182,8 @@ module.exports = React.createClass({
|
||||
onUserSettingsClose={this.onUserSettingsClose}
|
||||
onRegistered={this.onRegistered}
|
||||
teamToken={this._teamToken}
|
||||
userHasGeneratedPassword={this.state.userHasGeneratedPassword}
|
||||
cachedPassword={this.state.userHasGeneratedPassword ?
|
||||
localStorage.getItem('mx_pass') : null}
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user