summaryrefslogtreecommitdiffstats
path: root/webapp/components
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-09-02 12:23:26 -0300
committerChristopher Speller <crspeller@gmail.com>2016-09-02 11:23:26 -0400
commit385c644988517b0dc5c6d998fbd8b55f066ff91e (patch)
tree190000bf2534e609379179d121a853730c6e33e2 /webapp/components
parent438ff8f8bc924a42c634da6883558903938a1673 (diff)
downloadchat-385c644988517b0dc5c6d998fbd8b55f066ff91e.tar.gz
chat-385c644988517b0dc5c6d998fbd8b55f066ff91e.tar.bz2
chat-385c644988517b0dc5c6d998fbd8b55f066ff91e.zip
PLT-4035 Prevent request to getAuthorizedApps when OAuth provider is disabled (#3921)
Diffstat (limited to 'webapp/components')
-rw-r--r--webapp/components/user_settings/user_settings_security.jsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/webapp/components/user_settings/user_settings_security.jsx b/webapp/components/user_settings/user_settings_security.jsx
index bcffa157c..040c2bad3 100644
--- a/webapp/components/user_settings/user_settings_security.jsx
+++ b/webapp/components/user_settings/user_settings_security.jsx
@@ -56,13 +56,15 @@ export default class SecurityTab extends React.Component {
}
componentDidMount() {
- Client.getAuthorizedApps(
- (authorizedApps) => {
- this.setState({authorizedApps, serverError: null}); //eslint-disable-line react/no-did-mount-set-state
- },
- (err) => {
- this.setState({serverError: err.message}); //eslint-disable-line react/no-did-mount-set-state
- });
+ if (global.mm_config.EnableOAuthServiceProvider === 'true') {
+ Client.getAuthorizedApps(
+ (authorizedApps) => {
+ this.setState({authorizedApps, serverError: null}); //eslint-disable-line react/no-did-mount-set-state
+ },
+ (err) => {
+ this.setState({serverError: err.message}); //eslint-disable-line react/no-did-mount-set-state
+ });
+ }
}
submitPassword(e) {