From eeb1c1b5b827cc20ae32449bfc8c227152ba1a9d Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Fri, 29 Jan 2016 13:29:43 -0800 Subject: Properly disable the get team link functionality when user creation is disabled --- web/react/components/get_link_modal.jsx | 23 +++++++++++++++------- .../components/get_team_invite_link_modal.jsx | 12 ++++++++++- web/static/i18n/en.json | 1 + 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'web') diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx index 3fc71ff96..de3387a35 100644 --- a/web/react/components/get_link_modal.jsx +++ b/web/react/components/get_link_modal.jsx @@ -41,6 +41,8 @@ export default class GetLinkModal extends React.Component { } render() { + const userCreationEnabled = global.window.mm_config.EnableUserCreation === 'true'; + let helpText = null; if (this.props.helpText) { helpText = ( @@ -53,7 +55,7 @@ export default class GetLinkModal extends React.Component { } let copyLink = null; - if (document.queryCommandSupported('copy')) { + if (userCreationEnabled && document.queryCommandSupported('copy')) { copyLink = (