summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2016-03-03 16:01:41 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-03-03 16:02:50 -0500
commit31238f1d3a630b60bf8e1cfd90c9caa54f58d9f9 (patch)
tree64ec1417e33de75f8dd261f7b5fbd4cfbf13745d
parenta413c8ffa684b72840f116380c04a61f1d9cf524 (diff)
downloadchat-31238f1d3a630b60bf8e1cfd90c9caa54f58d9f9.tar.gz
chat-31238f1d3a630b60bf8e1cfd90c9caa54f58d9f9.tar.bz2
chat-31238f1d3a630b60bf8e1cfd90c9caa54f58d9f9.zip
Removed Get Team Invite Link link when user creation is disabled
-rw-r--r--web/react/components/get_link_modal.jsx23
-rw-r--r--web/react/components/navbar_dropdown.jsx2
2 files changed, 10 insertions, 15 deletions
diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx
index 6a5c3b588..3309d690c 100644
--- a/web/react/components/get_link_modal.jsx
+++ b/web/react/components/get_link_modal.jsx
@@ -41,8 +41,6 @@ export default class GetLinkModal extends React.Component {
}
render() {
- const userCreationEnabled = global.window.mm_config.EnableUserCreation === 'true';
-
let helpText = null;
if (this.props.helpText) {
helpText = (
@@ -55,7 +53,7 @@ export default class GetLinkModal extends React.Component {
}
let copyLink = null;
- if (userCreationEnabled && document.queryCommandSupported('copy')) {
+ if (document.queryCommandSupported('copy')) {
copyLink = (
<button
data-copy-btn='true'
@@ -71,17 +69,14 @@ export default class GetLinkModal extends React.Component {
);
}
- let linkText = null;
- if (userCreationEnabled) {
- linkText = (
- <textarea
- className='form-control no-resize min-height'
- readOnly='true'
- ref='textarea'
- value={this.props.link}
- />
- );
- }
+ const linkText = (
+ <textarea
+ className='form-control no-resize min-height'
+ readOnly='true'
+ ref='textarea'
+ value={this.props.link}
+ />
+ );
var copyLinkConfirm = null;
if (this.state.copiedLink) {
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index e9df03c33..0ddd6ff4f 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -107,7 +107,7 @@ export default class NavbarDropdown extends React.Component {
</li>
);
- if (this.props.teamType === Constants.OPEN_TEAM) {
+ if (this.props.teamType === Constants.OPEN_TEAM && global.window.mm_config.EnableUserCreation === 'true') {
teamLink = (
<li>
<a