Commit 5fb4b1bc authored by Joram Wilander's avatar Joram Wilander Committed by Christopher Speller

MM-8593 Default APIv3 to disabled for new installs (#8353)

* Default APIv3 to disabled for new installs

* Add EnableAPIv3 setting to client config

* Enable APIv3 for needed tests
parent 4211a2bb
......@@ -100,6 +100,7 @@ func setupTestHelper(enterprise bool) *TestHelper {
*cfg.TeamSettings.MaxUsersPerTeam = 50
*cfg.RateLimitSettings.Enable = false
cfg.EmailSettings.SendEmailNotifications = true
*cfg.ServiceSettings.EnableAPIv3 = true
})
prevListenAddress := *th.App.Config().ServiceSettings.ListenAddress
if testStore != nil {
......
......@@ -22,7 +22,7 @@
"EnableOnlyAdminIntegrations": true,
"EnablePostUsernameOverride": false,
"EnablePostIconOverride": false,
"EnableAPIv3": true,
"EnableAPIv3": false,
"EnableLinkPreviews": false,
"EnableTesting": false,
"EnableDeveloper": false,
......
......@@ -346,6 +346,7 @@ func GenerateClientConfig(c *model.Config, diagnosticId string, license *model.L
props["SiteURL"] = strings.TrimRight(*c.ServiceSettings.SiteURL, "/")
props["WebsocketURL"] = strings.TrimRight(*c.ServiceSettings.WebsocketURL, "/")
props["SiteName"] = c.TeamSettings.SiteName
props["EnableAPIv3"] = strconv.FormatBool(*c.ServiceSettings.EnableAPIv3)
props["EnableTeamCreation"] = strconv.FormatBool(c.TeamSettings.EnableTeamCreation)
props["EnableUserCreation"] = strconv.FormatBool(c.TeamSettings.EnableUserCreation)
props["EnableOpenServer"] = strconv.FormatBool(*c.TeamSettings.EnableOpenServer)
......
......@@ -59,6 +59,7 @@ func Setup() *app.App {
a.UpdateConfig(func(cfg *model.Config) {
*cfg.TeamSettings.EnableOpenServer = true
*cfg.ServiceSettings.EnableAPIv3 = true
})
return a
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment