[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>
Этот коммит содержится в:
@@ -165,34 +165,6 @@ func TestSaveReaction(t *testing.T) {
|
||||
th.AddPermissionToRole(model.PermissionAddReaction.Id, model.ChannelUserRoleId)
|
||||
})
|
||||
|
||||
t.Run("unable-to-react-in-read-only-town-square", func(t *testing.T) {
|
||||
th.LoginBasic()
|
||||
|
||||
channel, appErr := th.App.GetChannelByName("town-square", th.BasicTeam.Id, true)
|
||||
assert.Nil(t, appErr)
|
||||
post := th.CreatePostWithClient(th.Client, channel)
|
||||
|
||||
th.App.Srv().SetLicense(model.NewTestLicense())
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = true })
|
||||
|
||||
reaction := &model.Reaction{
|
||||
UserId: userId,
|
||||
PostId: post.Id,
|
||||
EmojiName: "smile",
|
||||
}
|
||||
|
||||
_, resp, err := client.SaveReaction(reaction)
|
||||
require.Error(t, err)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
reactions, appErr := th.App.GetReactionsForPost(post.Id)
|
||||
require.Nil(t, appErr)
|
||||
require.Equal(t, 0, len(reactions), "should have not created a reaction")
|
||||
|
||||
th.App.Srv().RemoveLicense()
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = false })
|
||||
})
|
||||
|
||||
t.Run("unable-to-react-in-an-archived-channel", func(t *testing.T) {
|
||||
th.LoginBasic()
|
||||
|
||||
@@ -501,42 +473,6 @@ func TestDeleteReaction(t *testing.T) {
|
||||
th.AddPermissionToRole(model.PermissionRemoveOthersReactions.Id, model.SystemAdminRoleId)
|
||||
})
|
||||
|
||||
t.Run("unable-to-delete-reactions-in-read-only-town-square", func(t *testing.T) {
|
||||
th.LoginBasic()
|
||||
|
||||
channel, appErr := th.App.GetChannelByName("town-square", th.BasicTeam.Id, true)
|
||||
assert.Nil(t, appErr)
|
||||
post := th.CreatePostWithClient(th.Client, channel)
|
||||
|
||||
th.App.Srv().SetLicense(model.NewTestLicense())
|
||||
|
||||
reaction := &model.Reaction{
|
||||
UserId: userId,
|
||||
PostId: post.Id,
|
||||
EmojiName: "smile",
|
||||
}
|
||||
|
||||
r1, _, err := client.SaveReaction(reaction)
|
||||
require.NoError(t, err)
|
||||
|
||||
reactions, appErr := th.App.GetReactionsForPost(postId)
|
||||
require.Nil(t, appErr)
|
||||
require.Equal(t, 1, len(reactions), "should have created a reaction")
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = true })
|
||||
|
||||
resp, err := th.SystemAdminClient.DeleteReaction(r1)
|
||||
require.Error(t, err)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
|
||||
reactions, appErr = th.App.GetReactionsForPost(postId)
|
||||
require.Nil(t, appErr)
|
||||
require.Equal(t, 1, len(reactions), "should have not deleted a reaction")
|
||||
|
||||
th.App.Srv().RemoveLicense()
|
||||
th.App.UpdateConfig(func(cfg *model.Config) { *cfg.TeamSettings.ExperimentalTownSquareIsReadOnly = false })
|
||||
})
|
||||
|
||||
t.Run("unable-to-delete-reactions-in-an-archived-channel", func(t *testing.T) {
|
||||
th.LoginBasic()
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user