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:
parent
5151264f60
commit
8725ef3863
4 changed files with 37 additions and 16 deletions
|
@ -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}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue