diff options
author | David Lu <david.lu@hotmail.com> | 2016-07-20 17:32:47 -0400 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-07-20 17:32:47 -0400 |
commit | 9b24f4dc4c73d8178617883cb276a44b61298012 (patch) | |
tree | ed05bacc9ba7affe86f14570533c5919ef253073 /webapp/components/login/login_controller.jsx | |
parent | d067296d7885a029e3780ea5f4eefed5e6300f48 (diff) | |
download | chat-9b24f4dc4c73d8178617883cb276a44b61298012.tar.gz chat-9b24f4dc4c73d8178617883cb276a44b61298012.tar.bz2 chat-9b24f4dc4c73d8178617883cb276a44b61298012.zip |
removed create account link if signup disabled (#3646)
Diffstat (limited to 'webapp/components/login/login_controller.jsx')
-rw-r--r-- | webapp/components/login/login_controller.jsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx index 0e5440b4b..bcd362f13 100644 --- a/webapp/components/login/login_controller.jsx +++ b/webapp/components/login/login_controller.jsx @@ -39,6 +39,8 @@ export default class LoginController extends React.Component { this.handleLoginIdChange = this.handleLoginIdChange.bind(this); this.handlePasswordChange = this.handlePasswordChange.bind(this); + this.checkSignUpEnabled = this.checkSignUpEnabled.bind(this); + this.state = { ldapEnabled: global.window.mm_license.IsLicensed === 'true' && global.window.mm_config.EnableLdap === 'true', usernameSigninEnabled: global.window.mm_config.EnableSignInWithUsername === 'true', @@ -268,6 +270,12 @@ export default class LoginController extends React.Component { return ''; } + checkSignUpEnabled() { + return global.window.mm_config.EnableSignUpWithEmail === 'true' || + global.window.mm_config.EnableSignUpWithGitLab === 'true' || + global.window.mm_config.EnableSignUpWithGoogle === 'true'; + } + createLoginOptions() { const extraParam = Utils.getUrlParameter('extra'); let extraBox = ''; @@ -380,7 +388,7 @@ export default class LoginController extends React.Component { ); } - if (global.window.mm_config.EnableOpenServer === 'true') { + if (global.window.mm_config.EnableOpenServer === 'true' && this.checkSignUpEnabled()) { loginControls.push( <div className='form-group' |