summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
authorElias Nahum <nahumhbl@gmail.com>2016-08-10 14:24:16 -0500
committerElias Nahum <nahumhbl@gmail.com>2016-08-10 14:24:16 -0500
commit8d5aa69950032777ea7286329d920de36aaa8a73 (patch)
tree8a4e32401d3bc9615221ab5a31015bff842be715 /webapp
parent805659239098a0b382a2a8bad704c2e91ab38ed6 (diff)
parentbd106bb4018ab71dc1bc973d562bcda3dfbb6868 (diff)
downloadchat-8d5aa69950032777ea7286329d920de36aaa8a73.tar.gz
chat-8d5aa69950032777ea7286329d920de36aaa8a73.tar.bz2
chat-8d5aa69950032777ea7286329d920de36aaa8a73.zip
Merge branch 'release-3.3' RC4
Diffstat (limited to 'webapp')
-rw-r--r--webapp/components/admin_console/oauth_settings.jsx2
-rw-r--r--webapp/components/admin_console/password_settings.jsx99
-rw-r--r--webapp/components/signup_user_complete.jsx10
-rw-r--r--webapp/i18n/en.json2
4 files changed, 59 insertions, 54 deletions
diff --git a/webapp/components/admin_console/oauth_settings.jsx b/webapp/components/admin_console/oauth_settings.jsx
index 92663ece8..1f377bcc3 100644
--- a/webapp/components/admin_console/oauth_settings.jsx
+++ b/webapp/components/admin_console/oauth_settings.jsx
@@ -406,7 +406,7 @@ export default class OAuthSettings extends AdminSettings {
oauthTypes.push({value: Constants.GOOGLE_SERVICE, text: Utils.localizeMessage('admin.oauth.google', 'Google Apps')});
}
if (global.window.mm_license.Office365SSO === 'true') {
- oauthTypes.push({value: Constants.OFFICE365_SERVICE, text: Utils.localizeMessage('admin.oauth.office365', 'Office 365')});
+ oauthTypes.push({value: Constants.OFFICE365_SERVICE, text: Utils.localizeMessage('admin.oauth.office365', 'Office 365 (Beta)')});
}
}
diff --git a/webapp/components/admin_console/password_settings.jsx b/webapp/components/admin_console/password_settings.jsx
index 20de8580f..7b312b0f4 100644
--- a/webapp/components/admin_console/password_settings.jsx
+++ b/webapp/components/admin_console/password_settings.jsx
@@ -34,28 +34,31 @@ export default class PasswordSettings extends AdminSettings {
});
// Update sample message from config settings
- let sampleErrorMsgId = 'user.settings.security.passwordError';
- if (props.config.PasswordSettings.Lowercase) {
- sampleErrorMsgId = sampleErrorMsgId + 'Lowercase';
- }
- if (props.config.PasswordSettings.Uppercase) {
- sampleErrorMsgId = sampleErrorMsgId + 'Uppercase';
- }
- if (props.config.PasswordSettings.Number) {
- sampleErrorMsgId = sampleErrorMsgId + 'Number';
- }
- if (props.config.PasswordSettings.Symbol) {
- sampleErrorMsgId = sampleErrorMsgId + 'Symbol';
+ this.sampleErrorMsg = null;
+ if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.PasswordRequirements === 'true') {
+ let sampleErrorMsgId = 'user.settings.security.passwordError';
+ if (props.config.PasswordSettings.Lowercase) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Lowercase';
+ }
+ if (props.config.PasswordSettings.Uppercase) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Uppercase';
+ }
+ if (props.config.PasswordSettings.Number) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Number';
+ }
+ if (props.config.PasswordSettings.Symbol) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Symbol';
+ }
+ this.sampleErrorMsg = (
+ <FormattedMessage
+ id={sampleErrorMsgId}
+ default='Your password must be at least {min} characters.'
+ values={{
+ min: props.config.PasswordSettings.MinimumLength
+ }}
+ />
+ );
}
- this.sampleErrorMsg = (
- <FormattedMessage
- id={sampleErrorMsgId}
- default='Your password must be at least {min} characters.'
- values={{
- min: props.config.PasswordSettings.MinimumLength
- }}
- />
- );
}
componentWillUpdate() {
@@ -94,37 +97,41 @@ export default class PasswordSettings extends AdminSettings {
}
getSampleErrorMsg() {
- if (this.props.config.PasswordSettings.MinimumLength > Constants.MAX_PASSWORD_LENGTH || this.props.config.PasswordSettings.MinimumLength < Constants.MIN_PASSWORD_LENGTH) {
+ if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.PasswordRequirements === 'true') {
+ if (this.props.config.PasswordSettings.MinimumLength > Constants.MAX_PASSWORD_LENGTH || this.props.config.PasswordSettings.MinimumLength < Constants.MIN_PASSWORD_LENGTH) {
+ return (
+ <FormattedMessage
+ id='user.settings.security.passwordMinLength'
+ default='Invalid minimum length, cannot show preview.'
+ />
+ );
+ }
+
+ let sampleErrorMsgId = 'user.settings.security.passwordError';
+ if (this.refs.lowercase.checked) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Lowercase';
+ }
+ if (this.refs.uppercase.checked) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Uppercase';
+ }
+ if (this.refs.number.checked) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Number';
+ }
+ if (this.refs.symbol.checked) {
+ sampleErrorMsgId = sampleErrorMsgId + 'Symbol';
+ }
return (
<FormattedMessage
- id='user.settings.security.passwordMinLength'
- default='Invalid minimum length, cannot show preview.'
+ id={sampleErrorMsgId}
+ default='Your password must be at least {min} characters.'
+ values={{
+ min: this.props.config.PasswordSettings.MinimumLength
+ }}
/>
);
}
- let sampleErrorMsgId = 'user.settings.security.passwordError';
- if (this.refs.lowercase.checked) {
- sampleErrorMsgId = sampleErrorMsgId + 'Lowercase';
- }
- if (this.refs.uppercase.checked) {
- sampleErrorMsgId = sampleErrorMsgId + 'Uppercase';
- }
- if (this.refs.number.checked) {
- sampleErrorMsgId = sampleErrorMsgId + 'Number';
- }
- if (this.refs.symbol.checked) {
- sampleErrorMsgId = sampleErrorMsgId + 'Symbol';
- }
- return (
- <FormattedMessage
- id={sampleErrorMsgId}
- default='Your password must be at least {min} characters.'
- values={{
- min: this.props.config.PasswordSettings.MinimumLength
- }}
- />
- );
+ return null;
}
renderTitle() {
diff --git a/webapp/components/signup_user_complete.jsx b/webapp/components/signup_user_complete.jsx
index eec143996..4c2668ece 100644
--- a/webapp/components/signup_user_complete.jsx
+++ b/webapp/components/signup_user_complete.jsx
@@ -69,12 +69,12 @@ export default class SignupUserComplete extends React.Component {
if ((inviteId && inviteId.length > 0) || (hash && hash.length > 0)) {
// if we are already logged in then attempt to just join the team
if (UserStore.getCurrentUser()) {
- loading = true;
Client.addUserToTeamFromInvite(
data,
hash,
inviteId,
(team) => {
+ loading = true;
GlobalActions.emitInitialLoad(
() => {
browserHistory.push('/' + team.name);
@@ -111,14 +111,12 @@ export default class SignupUserComplete extends React.Component {
serverError: null,
teamDisplayName: inviteData.display_name,
teamName: inviteData.name,
- teamId: inviteData.id,
- loading: false
+ teamId: inviteData.id
});
},
() => {
this.setState({
noOpenServerError: true,
- loading: false,
serverError:
<FormattedMessage
id='signup_user_completed.invalid_invite'
@@ -128,6 +126,7 @@ export default class SignupUserComplete extends React.Component {
}
);
+ loading = false;
data = '';
hash = '';
}
@@ -145,8 +144,7 @@ export default class SignupUserComplete extends React.Component {
<FormattedMessage
id='signup_user_completed.no_open_server'
defaultMessage='This server does not allow open signups. Please speak with your Administrator to receive an invitation.'
- />,
- loading: false
+ />
});
}
diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json
index 1636a3576..952b90543 100644
--- a/webapp/i18n/en.json
+++ b/webapp/i18n/en.json
@@ -477,7 +477,7 @@
"admin.oauth.gitlab": "GitLab",
"admin.oauth.google": "Google Apps",
"admin.oauth.off": "Do not allow sign-in via an OAuth 2.0 provider",
- "admin.oauth.office365": "Office 365",
+ "admin.oauth.office365": "Office 365 (Beta)",
"admin.oauth.providerDescription": "When true, Mattermost can act as an OAuth 2.0 service provider allowing Mattermost to authorize API requests from external applications.",
"admin.oauth.providerTitle": "Enable OAuth 2.0 Service Provider: ",
"admin.oauth.select": "Select OAuth 2.0 service provider:",