diff --git a/comty.js b/comty.js index 126bad9c..4911d7b1 160000 --- a/comty.js +++ b/comty.js @@ -1 +1 @@ -Subproject commit 126bad9c1e21c0c7fcab60a22fc9d70bbbd9a999 +Subproject commit 4911d7b1af76b1a06c52d14151bf70f09feda030 diff --git a/packages/app/src/components/Login/index.jsx b/packages/app/src/components/Login/index.jsx index ba7ffceb..272719a8 100755 --- a/packages/app/src/components/Login/index.jsx +++ b/packages/app/src/components/Login/index.jsx @@ -30,7 +30,7 @@ const phasesToSteps = { 1: "password", } -export default class Login extends React.Component { +class Login extends React.Component { static pageStatement = { bottomBarAllowed: false } @@ -41,6 +41,7 @@ export default class Login extends React.Component { error: null, phase: 0, mfa_required: null, + forbidden: false, } formRef = React.createRef() @@ -60,14 +61,10 @@ export default class Login extends React.Component { this.toggleLoading(true) await AuthModel.login(payload, this.onDone).catch((error) => { - if (error.response.data){ + if (error.response.data) { if (error.response.data.violation) { - this.props.close({ - unlock: true - }) - - return app.history.push("/violation", { - violation: error.response.data.violation + return this.setState({ + forbidden: error.response.data.violation }) } } @@ -157,7 +154,7 @@ export default class Login extends React.Component { value = value.toLowerCase() value = value.trim() } - + // remove error from ref this.formRef.current.setFields([ { @@ -235,6 +232,22 @@ export default class Login extends React.Component { } render() { + if (this.state.forbidden) { + return
Here is a detailed description of the violation
+ +If you think this is an error, or you want to apeel this decision please contact our support
+