diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-07-04 16:12:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 16:12:02 -0400 |
commit | 8ec8948c84e946fde736add0c4e6dd55f6efd1ab (patch) | |
tree | b6388c965c797d4dfe9c860b93b4249107b9a7b0 /webapp/components | |
parent | 4bd7b68b24137a9f8fe0abc908831cf95bb6c32b (diff) | |
download | chat-8ec8948c84e946fde736add0c4e6dd55f6efd1ab.tar.gz chat-8ec8948c84e946fde736add0c4e6dd55f6efd1ab.tar.bz2 chat-8ec8948c84e946fde736add0c4e6dd55f6efd1ab.zip |
PLT-6554 Add config setting to control enabling API version 3 (#6835)
* Add config setting to control enabling API version 3
* Update help text for APIv3 config setting (#6843)
* Update configuration_settings.jsx
* Update en.json
Diffstat (limited to 'webapp/components')
-rw-r--r-- | webapp/components/admin_console/configuration_settings.jsx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/webapp/components/admin_console/configuration_settings.jsx b/webapp/components/admin_console/configuration_settings.jsx index 72bd0e330..6ac68a3bb 100644 --- a/webapp/components/admin_console/configuration_settings.jsx +++ b/webapp/components/admin_console/configuration_settings.jsx @@ -2,7 +2,7 @@ // See License.txt for license information. import React from 'react'; -import {FormattedMessage} from 'react-intl'; +import {FormattedMessage, FormattedHTMLMessage} from 'react-intl'; import ErrorStore from 'stores/error_store.jsx'; @@ -47,6 +47,7 @@ export default class ConfigurationSettings extends AdminSettings { config.ServiceSettings.Forward80To443 = this.state.forward80To443; config.ServiceSettings.ReadTimeout = this.parseIntNonZero(this.state.readTimeout); config.ServiceSettings.WriteTimeout = this.parseIntNonZero(this.state.writeTimeout); + config.ServiceSettings.EnableAPIv3 = this.state.enableAPIv3; return config; } @@ -63,7 +64,8 @@ export default class ConfigurationSettings extends AdminSettings { letsEncryptCertificateCacheFile: config.ServiceSettings.LetsEncryptCertificateCacheFile, forward80To443: config.ServiceSettings.Forward80To443, readTimeout: config.ServiceSettings.ReadTimeout, - writeTimeout: config.ServiceSettings.WriteTimeout + writeTimeout: config.ServiceSettings.WriteTimeout, + enableAPIv3: config.ServiceSettings.EnableAPIv3 }; } @@ -304,6 +306,23 @@ export default class ConfigurationSettings extends AdminSettings { value={this.state.writeTimeout} onChange={this.handleChange} /> + <BooleanSetting + id='enableAPIv3' + label={ + <FormattedMessage + id='admin.service.enableAPIv3' + defaultMessage='Allow use of API v3 endpoints:' + /> + } + helpText={ + <FormattedHTMLMessage + id='admin.service.enableAPIv3Description' + defaultMessage='Set to false to disable all version 3 endpoints of the REST API. Integrations that rely on API v3 will fail and can then be identified for migration to API v4. API v3 is deprecated and will be removed in the near future. See <a href="https://api.mattermost.com" target="_blank">https://api.mattermost.com</a> for details.' + /> + } + value={this.state.enableAPIv3} + onChange={this.handleChange} + /> <WebserverModeDropdownSetting value={this.state.webserverMode} onChange={this.handleChange} |