summaryrefslogtreecommitdiffstats
path: root/webapp/routes/route_team.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-01-06 09:00:21 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-06 09:00:21 -0500
commit38f89cb1441376da77b35b08158db9405aad738b (patch)
treea7958225dfd50bc5ac9eb7edeeb4ba3ecb427ca0 /webapp/routes/route_team.jsx
parentff127bbaa343026a55429acf37f2c95186d07ac5 (diff)
downloadchat-38f89cb1441376da77b35b08158db9405aad738b.tar.gz
chat-38f89cb1441376da77b35b08158db9405aad738b.tar.bz2
chat-38f89cb1441376da77b35b08158db9405aad738b.zip
Fix MFA enforcement redirect loop (#4991)
Diffstat (limited to 'webapp/routes/route_team.jsx')
-rw-r--r--webapp/routes/route_team.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/webapp/routes/route_team.jsx b/webapp/routes/route_team.jsx
index 8416b91c0..4cc85c81b 100644
--- a/webapp/routes/route_team.jsx
+++ b/webapp/routes/route_team.jsx
@@ -61,6 +61,11 @@ function doChannelChange(state, replace, callback) {
}
function preNeedsTeam(nextState, replace, callback) {
+ if (RouteUtils.checkIfMFARequired(nextState)) {
+ browserHistory.push('/mfa/setup');
+ return;
+ }
+
// First check to make sure you're in the current team
// for the current url.
const teamName = nextState.params.team;