summaryrefslogtreecommitdiffstats
path: root/webapp/components/user_settings/user_settings_general.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-07-29 14:58:37 -0400
committerChristopher Speller <crspeller@gmail.com>2016-07-29 14:58:37 -0400
commit3f8dda6f5ad676c976fd5ae575a6790fdb505449 (patch)
tree015a739989103ce38481176fd5d55f5f703789cb /webapp/components/user_settings/user_settings_general.jsx
parent748fdef1fbded624a786533e8f065b91a047b91c (diff)
downloadchat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.tar.gz
chat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.tar.bz2
chat-3f8dda6f5ad676c976fd5ae575a6790fdb505449.zip
PLT-3633 EE: Add Google and Office365 SSO through OAuth2 (#3660)
* EE: Add Google and Office365 SSO through OAuth2 * Add localization strings * Text tweaks for PLT-3633 * Added sign-up button for Office 365 * Updated some error messages and a bit of licensing * Updated sign-in method section in user settings to include Google and Office365 * Added more localization strings
Diffstat (limited to 'webapp/components/user_settings/user_settings_general.jsx')
-rw-r--r--webapp/components/user_settings/user_settings_general.jsx56
1 files changed, 56 insertions, 0 deletions
diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx
index 8dce4deed..d1c195c7e 100644
--- a/webapp/components/user_settings/user_settings_general.jsx
+++ b/webapp/components/user_settings/user_settings_general.jsx
@@ -419,6 +419,42 @@ class UserSettingsGeneralTab extends React.Component {
{helpText}
</div>
);
+ } else if (this.props.user.auth_service === Constants.GOOGLE_SERVICE) {
+ inputs.push(
+ <div
+ key='oauthEmailInfo'
+ className='form-group'
+ >
+ <div className='setting-list__hint'>
+ <FormattedMessage
+ id='user.settings.general.emailGoogleCantUpdate'
+ defaultMessage='Login occurs through Google Apps. Email cannot be updated. Email address used for notifications is {email}.'
+ values={{
+ email: this.state.email
+ }}
+ />
+ </div>
+ {helpText}
+ </div>
+ );
+ } else if (this.props.user.auth_service === Constants.OFFICE365_SERVICE) {
+ inputs.push(
+ <div
+ key='oauthEmailInfo'
+ className='form-group'
+ >
+ <div className='setting-list__hint'>
+ <FormattedMessage
+ id='user.settings.general.emailOffice365CantUpdate'
+ defaultMessage='Login occurs through Office 365. Email cannot be updated. Email address used for notifications is {email}.'
+ values={{
+ email: this.state.email
+ }}
+ />
+ </div>
+ {helpText}
+ </div>
+ );
} else if (this.props.user.auth_service === Constants.LDAP_SERVICE) {
inputs.push(
<div
@@ -511,6 +547,26 @@ class UserSettingsGeneralTab extends React.Component {
}}
/>
);
+ } else if (this.props.user.auth_service === Constants.GOOGLE_SERVICE) {
+ describe = (
+ <FormattedMessage
+ id='user.settings.general.loginGoogle'
+ defaultMessage='Login done through Google Apps ({email})'
+ values={{
+ email: this.state.email
+ }}
+ />
+ );
+ } else if (this.props.user.auth_service === Constants.OFFICE365_SERVICE) {
+ describe = (
+ <FormattedMessage
+ id='user.settings.general.loginOffice365'
+ defaultMessage='Login done through Office 365 ({email})'
+ values={{
+ email: this.state.email
+ }}
+ />
+ );
} else if (this.props.user.auth_service === Constants.LDAP_SERVICE) {
describe = (
<FormattedMessage