[MM-36444] Manage config deprecations for 6.0 (#18035)
* removing deprecated stuff * removing deprecations and marking others for deprecations * removing some of the configs * partially remove ExperimentalChannelOrganization * fixing merge issues * moving default permissions to defaultroles function * removing experimentaltownsquare * removing old tests and remove legacysidebar config * fixing test * removing log * removing unused variables * MM-36444: Fix for renamed functions. * MM-36444: go mod tidy and go mod vendor. * MM-36444: Vendored go modules. * MM-36444: Removes UseExperimentalGossip config field from model. * Fix vendors * fixing test Co-authored-by: Benjamin Cooke <benjamincooke@Benjamins-MacBook-Pro.local> Co-authored-by: Mattermod <mattermod@users.noreply.github.com> Co-authored-by: Martin Kraft <martin@upspin.org> Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Этот коммит содержится в:
@@ -129,32 +129,6 @@ func TestIncomingWebhook(t *testing.T) {
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
})
|
||||
|
||||
t.Run("WebhookExperimentalReadOnly", func(t *testing.T) {
|
||||
th.App.Srv().SetLicense(model.NewTestLicense())
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = true })
|
||||
|
||||
// Read only default channel should fail.
|
||||
resp, err := http.Post(url, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", model.DefaultChannelName)))
|
||||
require.NoError(t, err)
|
||||
assert.True(t, resp.StatusCode != http.StatusOK)
|
||||
|
||||
// None-default channel should still work.
|
||||
resp, err = http.Post(url, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", th.BasicChannel.Name)))
|
||||
require.NoError(t, err)
|
||||
assert.True(t, resp.StatusCode == http.StatusOK)
|
||||
|
||||
// System-Admin Owned Hook
|
||||
adminHook, appErr := th.App.CreateIncomingWebhookForChannel(th.SystemAdminUser.Id, th.BasicChannel, &model.IncomingWebhook{ChannelId: th.BasicChannel.Id})
|
||||
require.Nil(t, appErr)
|
||||
adminURL := apiClient.URL + "/hooks/" + adminHook.Id
|
||||
|
||||
resp, err = http.Post(adminURL, "application/json", strings.NewReader(fmt.Sprintf("{\"text\":\"this is a test\", \"channel\":\"%s\"}", model.DefaultChannelName)))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode)
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = false })
|
||||
})
|
||||
|
||||
t.Run("WebhookAttachments", func(t *testing.T) {
|
||||
attachmentPayload := `{
|
||||
"text": "this is a test",
|
||||
|
||||
Ссылка в новой задаче
Block a user