Merge pull request #881 from matrix-org/luke/user-settings-remove-current-password
Remove "Current Password" input if mx_pass exists
This commit is contained in:
commit
c6350379dc
6 changed files with 145 additions and 35 deletions
|
@ -138,9 +138,6 @@ module.exports = React.createClass({
|
|||
register_hs_url: null,
|
||||
register_is_url: null,
|
||||
register_id_sid: null,
|
||||
|
||||
// Initially, use localStorage as source of truth
|
||||
userHasGeneratedPassword: localStorage && localStorage.getItem('mx_pass'),
|
||||
};
|
||||
return s;
|
||||
},
|
||||
|
@ -785,15 +782,11 @@ module.exports = React.createClass({
|
|||
/**
|
||||
* Called when a new logged in session has started
|
||||
*/
|
||||
_onLoggedIn: function(teamToken, isPasswordStored) {
|
||||
_onLoggedIn: function(teamToken) {
|
||||
this.setState({
|
||||
guestCreds: null,
|
||||
loggedIn: true,
|
||||
loggingIn: false,
|
||||
// isPasswordStored only true when ROU sets a username and becomes PWLU.
|
||||
// (the password was randomly generated and stored in localStorage).
|
||||
userHasGeneratedPassword:
|
||||
this.state.userHasGeneratedPassword || isPasswordStored,
|
||||
});
|
||||
|
||||
if (teamToken) {
|
||||
|
@ -1206,7 +1199,6 @@ module.exports = React.createClass({
|
|||
onUserSettingsClose={this.onUserSettingsClose}
|
||||
onRegistered={this.onRegistered}
|
||||
teamToken={this._teamToken}
|
||||
userHasGeneratedPassword={this.state.userHasGeneratedPassword}
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue