Fix MFA enforcement on login and page load (#6356)

Этот коммит содержится в:
Joram Wilander
2017-05-09 07:48:57 -05:00
коммит произвёл GitHub
родитель fb4d72bd8a
Коммит 202c383d8d
5 изменённых файлов: 20 добавлений и 6 удалений

Просмотреть файл

@@ -742,6 +742,12 @@ export function webLogin(loginId, password, token, success, error) {
success();
} else if (!ok && error) {
const serverError = getState().requests.users.login.error;
if (serverError.server_error_id === 'api.context.mfa_required.app_error') {
if (success) {
success();
}
return;
}
error({id: serverError.server_error_id, ...serverError});
}
}

Просмотреть файл

@@ -8,6 +8,8 @@ import React from 'react';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
import {browserHistory} from 'react-router/es6';
import {loadMe} from 'actions/user_actions.jsx';
export default class Confirm extends React.Component {
constructor(props) {
super(props);
@@ -25,7 +27,9 @@ export default class Confirm extends React.Component {
submit(e) {
e.preventDefault();
browserHistory.push('/');
loadMe(() => {
browserHistory.push('/');
});
}
onKeyPress(e) {

Просмотреть файл

@@ -22,7 +22,7 @@
"localforage": "1.5.0",
"marked": "mattermost/marked#8f5902fff9bad793cd6c66e0c44002c9e79e1317",
"match-at": "0.1.0",
"mattermost-redux": "mattermost/mattermost-redux#webapp-part4",
"mattermost-redux": "mattermost/mattermost-redux#webapp-3.9",
"object-assign": "4.1.1",
"pdfjs-dist": "1.7.363",
"perfect-scrollbar": "0.6.16",