summaryrefslogtreecommitdiffstats
path: root/web/react/components/login.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/login.jsx')
-rw-r--r--web/react/components/login.jsx34
1 files changed, 34 insertions, 0 deletions
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx
index 581b8e0b5..1c393c679 100644
--- a/web/react/components/login.jsx
+++ b/web/react/components/login.jsx
@@ -19,6 +19,8 @@ export default class Login extends React.Component {
render() {
const teamDisplayName = this.props.teamDisplayName;
const teamName = this.props.teamName;
+ const ldapEnabled = global.window.mm_config.EnableLdap === 'true';
+ const usernameSigninEnabled = global.window.mm_config.EnableSignInWithUsername === 'true';
let loginMessage = [];
if (global.window.mm_config.EnableSignUpWithGitLab === 'true') {
@@ -173,6 +175,22 @@ export default class Login extends React.Component {
);
}
+ if (ldapEnabled && (loginMessage.length > 0 || emailSignup || usernameSigninEnabled)) {
+ ldapLogin = (
+ <div>
+ <div className='or__container'>
+ <FormattedMessage
+ id='login.or'
+ defaultMessage='or'
+ />
+ </div>
+ <LoginLdap
+ teamName={this.props.teamName}
+ />
+ </div>
+ );
+ }
+
let findTeams = null;
if (!Utils.isMobileApp()) {
findTeams = (
@@ -197,6 +215,22 @@ export default class Login extends React.Component {
);
}
+ if (usernameSigninEnabled && (loginMessage.length > 0 || emailSignup || ldapEnabled)) {
+ usernameLogin = (
+ <div>
+ <div className='or__container'>
+ <FormattedMessage
+ id='login.or'
+ defaultMessage='or'
+ />
+ </div>
+ <LoginUsername
+ teamName={this.props.teamName}
+ />
+ </div>
+ );
+ }
+
return (
<div className='signup-team__container'>
<h5 className='margin--less'>