summaryrefslogtreecommitdiffstats
path: root/webapp/components/user_settings
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-11-10 09:25:00 -0500
committerHarrison Healey <harrisonmhealey@gmail.com>2016-11-10 09:25:00 -0500
commitb46ced78def34f81742072c493992afff62c6fb7 (patch)
tree27b271a08af4365a4b0b3ce4ad461053c353197f /webapp/components/user_settings
parentbe17e05d7322f9c6e6cbf93bff1cfca63b73aa76 (diff)
downloadchat-b46ced78def34f81742072c493992afff62c6fb7.tar.gz
chat-b46ced78def34f81742072c493992afff62c6fb7.tar.bz2
chat-b46ced78def34f81742072c493992afff62c6fb7.zip
If email accounts are disabled, allow email users to switch account type to one of the available types (#4517)
Diffstat (limited to 'webapp/components/user_settings')
-rw-r--r--webapp/components/user_settings/user_settings_security.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/user_settings/user_settings_security.jsx b/webapp/components/user_settings/user_settings_security.jsx
index 617acb7f5..0cee3dfca 100644
--- a/webapp/components/user_settings/user_settings_security.jsx
+++ b/webapp/components/user_settings/user_settings_security.jsx
@@ -928,8 +928,9 @@ export default class SecurityTab extends React.Component {
numMethods = config.EnableLdap === 'true' ? numMethods + 1 : numMethods;
numMethods = config.EnableSaml === 'true' ? numMethods + 1 : numMethods;
+ // If there are other sign-in methods and either email is enabled or the user's account is email, then allow switching
let signInSection;
- if (config.EnableSignUpWithEmail === 'true' && numMethods > 0) {
+ if ((config.EnableSignUpWithEmail === 'true' || user.auth_service === '') && numMethods > 0) {
signInSection = this.createSignInSection();
}