summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-12-11 08:47:46 -0500
committerChristopher Speller <crspeller@gmail.com>2015-12-11 08:47:46 -0500
commit607a8151de502bf45de131ef3632c741ad452333 (patch)
treeaa2b933f3c73ac739a758d6c7fd86720abdc1341 /web/react
parentd327461017849404b7f4f5a523b17e4bbde8e77c (diff)
parent9c79f02ca44961feef36b933be7e0ebec06fa427 (diff)
downloadchat-607a8151de502bf45de131ef3632c741ad452333.tar.gz
chat-607a8151de502bf45de131ef3632c741ad452333.tar.bz2
chat-607a8151de502bf45de131ef3632c741ad452333.zip
Merge pull request #1703 from rgarmsen2295/plt-583
PLT-583 Disables the ability to send email invites when user creation is disabled
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/invite_member_modal.jsx19
1 files changed, 13 insertions, 6 deletions
diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx
index 649ec7321..56bc00a7e 100644
--- a/web/react/components/invite_member_modal.jsx
+++ b/web/react/components/invite_member_modal.jsx
@@ -33,6 +33,7 @@ export default class InviteMemberModal extends React.Component {
firstNameErrors: {},
lastNameErrors: {},
emailEnabled: global.window.mm_config.SendEmailNotifications === 'true',
+ userCreationEnabled: global.window.mm_config.EnableUserCreation === 'true',
showConfirmModal: false,
isSendingEmails: false
};
@@ -252,7 +253,7 @@ export default class InviteMemberModal extends React.Component {
ref={'first_name' + index}
placeholder='First name'
maxLength='64'
- disabled={!this.state.emailEnabled}
+ disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
spellCheck='false'
/>
{firstNameError}
@@ -266,7 +267,7 @@ export default class InviteMemberModal extends React.Component {
ref={'last_name' + index}
placeholder='Last name'
maxLength='64'
- disabled={!this.state.emailEnabled}
+ disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
spellCheck='false'
/>
{lastNameError}
@@ -285,7 +286,7 @@ export default class InviteMemberModal extends React.Component {
className='form-control'
placeholder='email@domain.com'
maxLength='64'
- disabled={!this.state.emailEnabled}
+ disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
spellCheck='false'
/>
{emailError}
@@ -303,7 +304,7 @@ export default class InviteMemberModal extends React.Component {
var content = null;
var sendButton = null;
- if (this.state.emailEnabled) {
+ if (this.state.emailEnabled && this.state.userCreationEnabled) {
content = (
<div>
{serverError}
@@ -337,7 +338,7 @@ export default class InviteMemberModal extends React.Component {
{sendButtonLabel}
</button>
);
- } else {
+ } else if (this.state.userCreationEnabled) {
var teamInviteLink = null;
if (currentUser && TeamStore.getCurrent().type === 'O') {
var link = (
@@ -358,10 +359,16 @@ export default class InviteMemberModal extends React.Component {
content = (
<div>
- <p>Email is currently disabled for your team, and email invitations cannot be sent. Contact your system administrator to enable email and email invitations.</p>
+ <p>{'Email is currently disabled for your team, and email invitations cannot be sent. Contact your system administrator to enable email and email invitations.'}</p>
{teamInviteLink}
</div>
);
+ } else {
+ content = (
+ <div>
+ <p>{'User creation has been disabled for your team. Please ask your team administrator for details.'}</p>
+ </div>
+ );
}
return (