diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:04:13 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-09-06 23:11:58 -0700 |
commit | d8bd57901e33a7057e26e782e295099ffcc0da89 (patch) | |
tree | e12dfc8cad42b1576756d19d7fbfd82646a009bf /webapp/routes/route_utils.jsx | |
parent | 7bc8e9a08dfde56387f946fdf5086252aa4d0491 (diff) | |
download | chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.gz chat-d8bd57901e33a7057e26e782e295099ffcc0da89.tar.bz2 chat-d8bd57901e33a7057e26e782e295099ffcc0da89.zip |
Removing webapp
Diffstat (limited to 'webapp/routes/route_utils.jsx')
-rw-r--r-- | webapp/routes/route_utils.jsx | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/webapp/routes/route_utils.jsx b/webapp/routes/route_utils.jsx deleted file mode 100644 index 17fdc291d..000000000 --- a/webapp/routes/route_utils.jsx +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import UserStore from 'stores/user_store.jsx'; -import {ErrorPageTypes} from 'utils/constants.jsx'; - -export function importComponentSuccess(callback) { - return (comp) => callback(null, comp.default); -} - -export function createGetChildComponentsFunction(arrayOfComponents) { - return (locaiton, callback) => callback(null, arrayOfComponents); -} - -export const notFoundParams = { - type: ErrorPageTypes.PAGE_NOT_FOUND -}; - -const mfaPaths = [ - '/mfa/setup', - '/mfa/confirm' -]; - -const mfaAuthServices = [ - '', - 'email', - 'ldap' -]; - -export function checkIfMFARequired(state) { - if (window.mm_license.MFA === 'true' && - window.mm_config.EnableMultifactorAuthentication === 'true' && - window.mm_config.EnforceMultifactorAuthentication === 'true' && - mfaPaths.indexOf(state.location.pathname) === -1) { - const user = UserStore.getCurrentUser(); - if (user && !user.mfa_active && - mfaAuthServices.indexOf(user.auth_service) !== -1) { - return true; - } - } - - return false; -} |