mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -701,6 +701,8 @@
|
||||
"admin.service.corsTitle": "Enable cross-origin requests from:",
|
||||
"admin.service.developerDesc": "When true, JavaScript errors are shown in a purple bar at the top of the user interface. Not recommended for use in production. ",
|
||||
"admin.service.developerTitle": "Enable Developer Mode: ",
|
||||
"admin.service.enableAPIv3": "Allow use of API v3 endpoints:",
|
||||
"admin.service.enableAPIv3Description": "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.",
|
||||
"admin.service.enforceMfaDesc": "When true, <a href='https://docs.mattermost.com/deployment/auth.html' target='_blank'>multi-factor authentication</a> is required for login. New users will be required to configure MFA on signup. Logged in users without MFA configured are redirected to the MFA setup page until configuration is complete.<br/><br/>If your system has users with login methods other than AD/LDAP and email, MFA must be enforced with the authentication provider outside of Mattermost.",
|
||||
"admin.service.enforceMfaTitle": "Enforce Multi-factor Authentication:",
|
||||
"admin.service.forward80To443": "Forward port 80 to 443:",
|
||||
|
||||
Reference in New Issue
Block a user