diff options
Diffstat (limited to 'web/react/components/login.jsx')
-rw-r--r-- | web/react/components/login.jsx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 30c8ffe4f..d3ee35082 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -49,6 +49,8 @@ export default class Login extends React.Component { const teamDisplayName = currentTeam.display_name; const teamName = currentTeam.name; + 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') { @@ -209,6 +211,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={teamName} + /> + </div> + ); + } + let usernameLogin = null; if (global.window.mm_config.EnableSignInWithUsername === 'true') { usernameLogin = ( @@ -218,6 +236,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={teamName} + /> + </div> + ); + } + return ( <div> <div className='signup-header'> |