From 463fd8c20b6e20d1cc669810c339770b9b1ede41 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 17 Mar 2016 15:46:16 -0400 Subject: Add the ability to switch from email to ldap and back --- webapp/components/claim/claim.jsx | 88 +++++++++++ webapp/components/claim/claim_account.jsx | 116 -------------- .../components/claim/components/email_to_ldap.jsx | 169 +++++++++++++++++++++ .../components/claim/components/email_to_oauth.jsx | 139 +++++++++++++++++ .../components/claim/components/ldap_to_email.jsx | 167 ++++++++++++++++++++ .../components/claim/components/oauth_to_email.jsx | 143 +++++++++++++++++ webapp/components/claim/email_to_sso.jsx | 154 ------------------- webapp/components/claim/sso_to_email.jsx | 168 -------------------- .../user_settings/user_settings_security.jsx | 45 ++++-- 9 files changed, 742 insertions(+), 447 deletions(-) create mode 100644 webapp/components/claim/claim.jsx delete mode 100644 webapp/components/claim/claim_account.jsx create mode 100644 webapp/components/claim/components/email_to_ldap.jsx create mode 100644 webapp/components/claim/components/email_to_oauth.jsx create mode 100644 webapp/components/claim/components/ldap_to_email.jsx create mode 100644 webapp/components/claim/components/oauth_to_email.jsx delete mode 100644 webapp/components/claim/email_to_sso.jsx delete mode 100644 webapp/components/claim/sso_to_email.jsx (limited to 'webapp/components') diff --git a/webapp/components/claim/claim.jsx b/webapp/components/claim/claim.jsx new file mode 100644 index 000000000..0254897f9 --- /dev/null +++ b/webapp/components/claim/claim.jsx @@ -0,0 +1,88 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import TeamStore from '../../stores/team_store.jsx'; + +import React from 'react'; +import {FormattedMessage} from 'react-intl'; + +import logoImage from 'images/logo.png'; + +export default class Claim extends React.Component { + constructor(props) { + super(props); + + this.onTeamChange = this.onTeamChange.bind(this); + this.updateStateFromStores = this.updateStateFromStores.bind(this); + + this.state = {}; + } + componentWillMount() { + this.setState({ + email: this.props.location.query.email, + newType: this.props.location.query.new_type, + oldType: this.props.location.query.old_type, + teamName: this.props.params.team, + teamDisplayName: '' + }); + this.updateStateFromStores(); + } + componentDidMount() { + TeamStore.addChangeListener(this.onTeamChange); + } + componentWillUnmount() { + TeamStore.removeChangeListener(this.onTeamChange); + } + updateStateFromStores() { + const team = TeamStore.getByName(this.state.teamName); + let displayName = ''; + if (team) { + displayName = team.display_name; + } + this.setState({ + teamDisplayName: displayName + }); + } + onTeamChange() { + this.updateStateFromStores(); + } + render() { + return ( +
+
+ + + + +
+
+
+ +
+ {React.cloneElement(this.props.children, { + teamName: this.state.teamName, + teamDisplayName: this.state.teamDisplayName, + currentType: this.state.oldType, + newType: this.state.newType, + email: this.state.email + })} +
+
+
+
+ ); + } +} + +Claim.defaultProps = { +}; +Claim.propTypes = { + params: React.PropTypes.object.isRequired, + location: React.PropTypes.object.isRequired, + children: React.PropTypes.node +}; diff --git a/webapp/components/claim/claim_account.jsx b/webapp/components/claim/claim_account.jsx deleted file mode 100644 index b6495e283..000000000 --- a/webapp/components/claim/claim_account.jsx +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import EmailToSSO from './email_to_sso.jsx'; -import SSOToEmail from './sso_to_email.jsx'; -import TeamStore from 'stores/team_store.jsx'; - -import {FormattedMessage} from 'react-intl'; - -import React from 'react'; -import logoImage from 'images/logo.png'; - -export default class ClaimAccount extends React.Component { - constructor(props) { - super(props); - - this.onTeamChange = this.onTeamChange.bind(this); - this.updateStateFromStores = this.updateStateFromStores.bind(this); - - this.state = {}; - } - componentWillMount() { - this.setState({ - email: this.props.location.query.email, - newType: this.props.location.query.new_type, - oldType: this.props.location.query.old_type, - teamName: this.props.params.team, - teamDisplayName: '' - }); - this.updateStateFromStores(); - } - componentDidMount() { - TeamStore.addChangeListener(this.onTeamChange); - } - componentWillUnmount() { - TeamStore.removeChangeListener(this.onTeamChange); - } - updateStateFromStores() { - const team = TeamStore.getByName(this.state.teamName); - let displayName = ''; - if (team) { - displayName = team.displayName; - } - this.setState({ - teamDisplayName: displayName - }); - } - onTeamChange() { - this.updateStateFromStores(); - } - render() { - if (this.state.teamDisplayName === '') { - return (
); - } - let content; - if (this.state.email === '') { - content = ( -

- -

- ); - } else if (this.state.oldType === '' && this.state.newType !== '') { - content = ( - - ); - } else { - content = ( - - ); - } - - return ( -
- -
-
- -
- {content} -
-
-
-
- ); - } -} - -ClaimAccount.defaultProps = { -}; -ClaimAccount.propTypes = { - params: React.PropTypes.object.isRequired, - location: React.PropTypes.object.isRequired -}; diff --git a/webapp/components/claim/components/email_to_ldap.jsx b/webapp/components/claim/components/email_to_ldap.jsx new file mode 100644 index 000000000..bb2a3f0ed --- /dev/null +++ b/webapp/components/claim/components/email_to_ldap.jsx @@ -0,0 +1,169 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import * as Utils from '../../../utils/utils.jsx'; +import * as Client from '../../../utils/client.jsx'; + +import React from 'react'; +import ReactDOM from 'react-dom'; +import {FormattedMessage} from 'react-intl'; + +export default class EmailToLDAP extends React.Component { + constructor(props) { + super(props); + + this.submit = this.submit.bind(this); + + this.state = {}; + } + submit(e) { + e.preventDefault(); + var state = {}; + + const password = ReactDOM.findDOMNode(this.refs.password).value.trim(); + if (!password) { + state.error = Utils.localizeMessage('claim.email_to_ldap.pwdError', 'Please enter your password.'); + this.setState(state); + return; + } + + const ldapId = ReactDOM.findDOMNode(this.refs.ldapid).value.trim(); + if (!ldapId) { + state.error = Utils.localizeMessage('claim.email_to_ldap.ldapIdError', 'Please enter your LDAP ID.'); + this.setState(state); + return; + } + + const ldapPassword = ReactDOM.findDOMNode(this.refs.ldappassword).value.trim(); + if (!ldapPassword) { + state.error = Utils.localizeMessage('claim.email_to_ldap.ldapPasswordError', 'Please enter your LDAP password.'); + this.setState(state); + return; + } + + state.error = null; + this.setState(state); + + var postData = {}; + postData.email_password = password; + postData.ldap_id = ldapId; + postData.ldap_password = ldapPassword; + postData.email = this.props.email; + postData.team_name = this.props.teamName; + + Client.emailToLDAP(postData, + (data) => { + if (data.follow_link) { + window.location.href = data.follow_link; + } + }, + (error) => { + this.setState({error}); + } + ); + } + render() { + var error = null; + if (this.state.error) { + error =
; + } + + var formClass = 'form-group'; + if (error) { + formClass += ' has-error'; + } + + return ( +
+

+ +

+
+

+ +

+

+ +

+

+ +

+
+ +
+

+ +

+
+ +
+
+ +
+ {error} + +
+
+ ); + } +} + +EmailToLDAP.defaultProps = { +}; +EmailToLDAP.propTypes = { + email: React.PropTypes.string, + teamName: React.PropTypes.string, + teamDisplayName: React.PropTypes.string +}; diff --git a/webapp/components/claim/components/email_to_oauth.jsx b/webapp/components/claim/components/email_to_oauth.jsx new file mode 100644 index 000000000..51549423d --- /dev/null +++ b/webapp/components/claim/components/email_to_oauth.jsx @@ -0,0 +1,139 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import * as Utils from '../../../utils/utils.jsx'; +import * as Client from '../../../utils/client.jsx'; + +import React from 'react'; +import ReactDOM from 'react-dom'; +import {FormattedMessage} from 'react-intl'; + +export default class EmailToOAuth extends React.Component { + constructor(props) { + super(props); + + this.submit = this.submit.bind(this); + + this.state = {}; + } + submit(e) { + e.preventDefault(); + var state = {}; + + var password = ReactDOM.findDOMNode(this.refs.password).value.trim(); + if (!password) { + state.error = Utils.localizeMessage('claim.email_to_oauth.pwdError', 'Please enter your password.'); + this.setState(state); + return; + } + + state.error = null; + this.setState(state); + + var postData = {}; + postData.password = password; + postData.email = this.props.email; + postData.team_name = this.props.teamName; + postData.service = this.props.newType; + + Client.emailToOAuth(postData, + (data) => { + if (data.follow_link) { + window.location.href = data.follow_link; + } + }, + (error) => { + this.setState({error}); + } + ); + } + render() { + var error = null; + if (this.state.error) { + error =
; + } + + var formClass = 'form-group'; + if (error) { + formClass += ' has-error'; + } + + const uiType = Utils.toTitleCase(this.props.newType) + ' SSO'; + + return ( +
+

+ +

+
+

+ +

+

+ +

+

+ +

+
+ +
+ {error} + +
+
+ ); + } +} + +EmailToOAuth.defaultProps = { +}; +EmailToOAuth.propTypes = { + newType: React.PropTypes.string, + email: React.PropTypes.string, + teamName: React.PropTypes.string, + teamDisplayName: React.PropTypes.string +}; diff --git a/webapp/components/claim/components/ldap_to_email.jsx b/webapp/components/claim/components/ldap_to_email.jsx new file mode 100644 index 000000000..d645819b5 --- /dev/null +++ b/webapp/components/claim/components/ldap_to_email.jsx @@ -0,0 +1,167 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import * as Utils from '../../../utils/utils.jsx'; +import * as Client from '../../../utils/client.jsx'; + +import React from 'react'; +import ReactDOM from 'react-dom'; +import {FormattedMessage} from 'react-intl'; + +export default class LDAPToEmail extends React.Component { + constructor(props) { + super(props); + + this.submit = this.submit.bind(this); + + this.state = {}; + } + submit(e) { + e.preventDefault(); + var state = {}; + + const password = ReactDOM.findDOMNode(this.refs.password).value.trim(); + if (!password) { + state.error = Utils.localizeMessage('claim.ldap_to_email.pwdError', 'Please enter your password.'); + this.setState(state); + return; + } + + const confirmPassword = ReactDOM.findDOMNode(this.refs.passwordconfirm).value.trim(); + if (!confirmPassword || password !== confirmPassword) { + state.error = Utils.localizeMessage('claim.ldap_to_email.pwdNotMatch', 'Passwords do not match.'); + this.setState(state); + return; + } + + const ldapPassword = ReactDOM.findDOMNode(this.refs.ldappassword).value.trim(); + if (!ldapPassword) { + state.error = Utils.localizeMessage('claim.ldap_to_email.ldapPasswordError', 'Please enter your LDAP password.'); + this.setState(state); + return; + } + + state.error = null; + this.setState(state); + + var postData = {}; + postData.email_password = password; + postData.ldap_password = ldapPassword; + postData.email = this.props.email; + postData.team_name = this.props.teamName; + + Client.ldapToEmail(postData, + (data) => { + if (data.follow_link) { + window.location.href = data.follow_link; + } + }, + (error) => { + this.setState({error}); + } + ); + } + render() { + var error = null; + if (this.state.error) { + error =
; + } + + var formClass = 'form-group'; + if (error) { + formClass += ' has-error'; + } + + return ( +
+

+ +

+
+

+ +

+

+ +

+

+ +

+
+ +
+

+ +

+
+ +
+
+ +
+ {error} + +
+
+ ); + } +} + +LDAPToEmail.defaultProps = { +}; +LDAPToEmail.propTypes = { + email: React.PropTypes.string, + teamName: React.PropTypes.string, + teamDisplayName: React.PropTypes.string +}; diff --git a/webapp/components/claim/components/oauth_to_email.jsx b/webapp/components/claim/components/oauth_to_email.jsx new file mode 100644 index 000000000..11246bea7 --- /dev/null +++ b/webapp/components/claim/components/oauth_to_email.jsx @@ -0,0 +1,143 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import * as Utils from '../../../utils/utils.jsx'; +import * as Client from '../../../utils/client.jsx'; + +import React from 'react'; +import ReactDOM from 'react-dom'; +import {FormattedMessage} from 'react-intl'; + +export default class OAuthToEmail extends React.Component { + constructor(props) { + super(props); + + this.submit = this.submit.bind(this); + + this.state = {}; + } + submit(e) { + e.preventDefault(); + const state = {}; + + const password = ReactDOM.findDOMNode(this.refs.password).value.trim(); + if (!password) { + state.error = Utils.localizeMessage('claim.oauth_to_email.enterPwd', 'Please enter a password.'); + this.setState(state); + return; + } + + const confirmPassword = ReactDOM.findDOMNode(this.refs.passwordconfirm).value.trim(); + if (!confirmPassword || password !== confirmPassword) { + state.error = Utils.localizeMessage('claim.oauth_to_email.pwdNotMatch', 'Password do not match.'); + this.setState(state); + return; + } + + state.error = null; + this.setState(state); + + var postData = {}; + postData.password = password; + postData.email = this.props.email; + postData.team_name = this.props.teamName; + + Client.oauthToEmail(postData, + (data) => { + if (data.follow_link) { + window.location.href = data.follow_link; + } + }, + (error) => { + this.setState({error}); + } + ); + } + render() { + var error = null; + if (this.state.error) { + error =
; + } + + var formClass = 'form-group'; + if (error) { + formClass += ' has-error'; + } + + const uiType = Utils.toTitleCase(this.props.currentType) + ' SSO'; + + return ( +
+

+ +

+
+

+ +

+

+ +

+
+ +
+
+ +
+ {error} + +
+
+ ); + } +} + +OAuthToEmail.defaultProps = { +}; +OAuthToEmail.propTypes = { + teamName: React.PropTypes.string, + teamDisplayName: React.PropTypes.string, + currentType: React.PropTypes.string, + email: React.PropTypes.string +}; diff --git a/webapp/components/claim/email_to_sso.jsx b/webapp/components/claim/email_to_sso.jsx deleted file mode 100644 index d09449247..000000000 --- a/webapp/components/claim/email_to_sso.jsx +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import ReactDOM from 'react-dom'; -import * as Utils from 'utils/utils.jsx'; -import * as Client from 'utils/client.jsx'; - -import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl'; - -const holders = defineMessages({ - pwdError: { - id: 'claim.email_to_sso.pwdError', - defaultMessage: 'Please enter your password.' - }, - pwd: { - id: 'claim.email_to_sso.pwd', - defaultMessage: 'Password' - } -}); - -import React from 'react'; - -class EmailToSSO extends React.Component { - constructor(props) { - super(props); - - this.submit = this.submit.bind(this); - - this.state = {}; - } - submit(e) { - e.preventDefault(); - var state = {}; - - var password = ReactDOM.findDOMNode(this.refs.password).value.trim(); - if (!password) { - state.error = this.props.intl.formatMessage(holders.pwdError); - this.setState(state); - return; - } - - state.error = null; - this.setState(state); - - var postData = {}; - postData.password = password; - postData.email = this.props.email; - postData.team_name = this.props.teamName; - postData.service = this.props.type; - - Client.switchToSSO(postData, - (data) => { - if (data.follow_link) { - window.location.href = data.follow_link; - } - }, - (error) => { - this.setState({error}); - } - ); - } - render() { - var error = null; - if (this.state.error) { - error =
; - } - - var formClass = 'form-group'; - if (error) { - formClass += ' has-error'; - } - - const uiType = Utils.toTitleCase(this.props.type) + ' SSO'; - - return ( -
-

- -

-
-

- -

-

- -

-

- -

-
- -
- {error} - -
-
- ); - } -} - -EmailToSSO.defaultProps = { -}; -EmailToSSO.propTypes = { - intl: intlShape.isRequired, - type: React.PropTypes.string.isRequired, - email: React.PropTypes.string.isRequired, - teamName: React.PropTypes.string.isRequired, - teamDisplayName: React.PropTypes.string.isRequired -}; - -export default injectIntl(EmailToSSO); diff --git a/webapp/components/claim/sso_to_email.jsx b/webapp/components/claim/sso_to_email.jsx deleted file mode 100644 index a41e09969..000000000 --- a/webapp/components/claim/sso_to_email.jsx +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import ReactDOM from 'react-dom'; -import * as Utils from 'utils/utils.jsx'; -import * as Client from 'utils/client.jsx'; - -import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl'; - -const holders = defineMessages({ - enterPwd: { - id: 'claim.sso_to_email.enterPwd', - defaultMessage: 'Please enter a password.' - }, - pwdNotMatch: { - id: 'claim.sso_to_email.pwdNotMatch', - defaultMessage: 'Password do not match.' - }, - newPwd: { - id: 'claim.sso_to_email.newPwd', - defaultMessage: 'New Password' - }, - confirm: { - id: 'claim.sso_to_email.confirm', - defaultMessage: 'Confirm Password' - } -}); - -import React from 'react'; - -class SSOToEmail extends React.Component { - constructor(props) { - super(props); - - this.submit = this.submit.bind(this); - - this.state = {}; - } - submit(e) { - const {formatMessage} = this.props.intl; - e.preventDefault(); - const state = {}; - - const password = ReactDOM.findDOMNode(this.refs.password).value.trim(); - if (!password) { - state.error = formatMessage(holders.enterPwd); - this.setState(state); - return; - } - - const confirmPassword = ReactDOM.findDOMNode(this.refs.passwordconfirm).value.trim(); - if (!confirmPassword || password !== confirmPassword) { - state.error = formatMessage(holders.pwdNotMatch); - this.setState(state); - return; - } - - state.error = null; - this.setState(state); - - var postData = {}; - postData.password = password; - postData.email = this.props.email; - postData.team_name = this.props.teamName; - - Client.switchToEmail(postData, - (data) => { - if (data.follow_link) { - window.location.href = data.follow_link; - } - }, - (error) => { - this.setState({error}); - } - ); - } - render() { - const {formatMessage} = this.props.intl; - var error = null; - if (this.state.error) { - error =
; - } - - var formClass = 'form-group'; - if (error) { - formClass += ' has-error'; - } - - const uiType = Utils.toTitleCase(this.props.currentType) + ' SSO'; - - return ( -
-

- -

-
-

- -

-

- -

-
- -
-
- -
- {error} - -
-
- ); - } -} - -SSOToEmail.defaultProps = { -}; -SSOToEmail.propTypes = { - intl: intlShape.isRequired, - currentType: React.PropTypes.string.isRequired, - email: React.PropTypes.string.isRequired, - teamName: React.PropTypes.string.isRequired, - teamDisplayName: React.PropTypes.string -}; - -export default injectIntl(SSOToEmail); diff --git a/webapp/components/user_settings/user_settings_security.jsx b/webapp/components/user_settings/user_settings_security.jsx index e42de91ea..283d2c425 100644 --- a/webapp/components/user_settings/user_settings_security.jsx +++ b/webapp/components/user_settings/user_settings_security.jsx @@ -15,6 +15,7 @@ import * as Utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; import {intlShape, injectIntl, defineMessages, FormattedMessage, FormattedTime, FormattedDate} from 'react-intl'; +import {Link} from 'react-router'; const holders = defineMessages({ currentPasswordError: { @@ -268,17 +269,24 @@ class SecurityTab extends React.Component { let emailOption; if (global.window.mm_config.EnableSignUpWithEmail === 'true' && user.auth_service !== '') { + let link; + if (user.auth_service === Constants.LDAP_SERVICE) { + link = '/' + teamName + '/claim/ldap_to_email?email=' + encodeURIComponent(user.email); + } else { + link = '/' + teamName + '/claim/oauth_to_email?email=' + encodeURIComponent(user.email) + '&old_type=' + user.auth_service; + } + emailOption = (
- - +
); @@ -288,15 +296,15 @@ class SecurityTab extends React.Component { if (global.window.mm_config.EnableSignUpWithGitLab === 'true' && user.auth_service === '') { gitlabOption = (
- - +
); @@ -306,15 +314,33 @@ class SecurityTab extends React.Component { if (global.window.mm_config.EnableSignUpWithGoogle === 'true' && user.auth_service === '') { googleOption = (
- - + +
+
+ ); + } + + let ldapOption; + if (global.window.mm_config.EnableLdap === 'true' && user.auth_service === '') { + ldapOption = ( +
+ +
); @@ -325,6 +351,7 @@ class SecurityTab extends React.Component { {emailOption} {gitlabOption}
+ {ldapOption} {googleOption}
); -- cgit v1.2.3-1-g7c22 From 934c7c7a7c8423d71fdc7d1586b9c03aedcc5129 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 23 Mar 2016 15:59:43 -0400 Subject: Fix imports and change ldap function name --- webapp/components/claim/claim.jsx | 2 +- webapp/components/claim/components/email_to_ldap.jsx | 4 ++-- webapp/components/claim/components/email_to_oauth.jsx | 4 ++-- webapp/components/claim/components/ldap_to_email.jsx | 4 ++-- webapp/components/claim/components/oauth_to_email.jsx | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/claim/claim.jsx b/webapp/components/claim/claim.jsx index 0254897f9..464187c37 100644 --- a/webapp/components/claim/claim.jsx +++ b/webapp/components/claim/claim.jsx @@ -1,7 +1,7 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import TeamStore from '../../stores/team_store.jsx'; +import TeamStore from 'stores/team_store.jsx'; import React from 'react'; import {FormattedMessage} from 'react-intl'; diff --git a/webapp/components/claim/components/email_to_ldap.jsx b/webapp/components/claim/components/email_to_ldap.jsx index bb2a3f0ed..f3046fa74 100644 --- a/webapp/components/claim/components/email_to_ldap.jsx +++ b/webapp/components/claim/components/email_to_ldap.jsx @@ -1,8 +1,8 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as Utils from '../../../utils/utils.jsx'; -import * as Client from '../../../utils/client.jsx'; +import * as Utils from 'utils/utils.jsx'; +import * as Client from 'utils/client.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/webapp/components/claim/components/email_to_oauth.jsx b/webapp/components/claim/components/email_to_oauth.jsx index 51549423d..f3e370a4a 100644 --- a/webapp/components/claim/components/email_to_oauth.jsx +++ b/webapp/components/claim/components/email_to_oauth.jsx @@ -1,8 +1,8 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as Utils from '../../../utils/utils.jsx'; -import * as Client from '../../../utils/client.jsx'; +import * as Utils from 'utils/utils.jsx'; +import * as Client from 'utils/client.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/webapp/components/claim/components/ldap_to_email.jsx b/webapp/components/claim/components/ldap_to_email.jsx index d645819b5..b4ffd4944 100644 --- a/webapp/components/claim/components/ldap_to_email.jsx +++ b/webapp/components/claim/components/ldap_to_email.jsx @@ -1,8 +1,8 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as Utils from '../../../utils/utils.jsx'; -import * as Client from '../../../utils/client.jsx'; +import * as Utils from 'utils/utils.jsx'; +import * as Client from 'utils/client.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; diff --git a/webapp/components/claim/components/oauth_to_email.jsx b/webapp/components/claim/components/oauth_to_email.jsx index 11246bea7..476677aeb 100644 --- a/webapp/components/claim/components/oauth_to_email.jsx +++ b/webapp/components/claim/components/oauth_to_email.jsx @@ -1,8 +1,8 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import * as Utils from '../../../utils/utils.jsx'; -import * as Client from '../../../utils/client.jsx'; +import * as Utils from 'utils/utils.jsx'; +import * as Client from 'utils/client.jsx'; import React from 'react'; import ReactDOM from 'react-dom'; -- cgit v1.2.3-1-g7c22