From 99493bc5fa11d8e50d46c19e2678ddb2c99c0bbb Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 10 Jan 2017 10:05:58 -0500
Subject: PLT-5212 Add password setting text for google and office365 (#5029)

---
 .../user_settings/user_settings_security.jsx       | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

(limited to 'webapp/components/user_settings/user_settings_security.jsx')

diff --git a/webapp/components/user_settings/user_settings_security.jsx b/webapp/components/user_settings/user_settings_security.jsx
index bc13437b0..e936f5b96 100644
--- a/webapp/components/user_settings/user_settings_security.jsx
+++ b/webapp/components/user_settings/user_settings_security.jsx
@@ -427,6 +427,34 @@ export default class SecurityTab extends React.Component {
                         </div>
                     </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.security.passwordGoogleCantUpdate'
+                                defaultMessage='Login occurs through Google Apps. Password cannot be updated.'
+                            />
+                        </div>
+                    </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.security.passwordOffice365CantUpdate'
+                                defaultMessage='Login occurs through Office 365. Password cannot be updated.'
+                            />
+                        </div>
+                    </div>
+                );
             }
 
             updateSectionStatus = function resetSection(e) {
@@ -504,6 +532,20 @@ export default class SecurityTab extends React.Component {
                     defaultMessage='Login done through SAML'
                 />
             );
+        } else if (this.props.user.auth_service === Constants.GOOGLE_SERVICE) {
+            describe = (
+                <FormattedMessage
+                    id='user.settings.security.loginGoogle'
+                    defaultMessage='Login done through Google Apps'
+                />
+            );
+        } else if (this.props.user.auth_service === Constants.OFFICE365_SERVICE) {
+            describe = (
+                <FormattedMessage
+                    id='user.settings.security.loginOffice365'
+                    defaultMessage='Login done through Office 365'
+                />
+            );
         }
 
         updateSectionStatus = function updateSection() {
-- 
cgit v1.2.3-1-g7c22

