MM-27407 Return archived channels even if view archived config is false for sysadmin endpoints (#15149)
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
339c5bae76
Коммит
d4dac31b04
@@ -969,15 +969,6 @@ func TestGetAllChannels(t *testing.T) {
|
||||
defer th.TearDown()
|
||||
Client := th.Client
|
||||
|
||||
var originalConfigVal bool
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
originalConfigVal = *cfg.TeamSettings.ExperimentalViewArchivedChannels
|
||||
*cfg.TeamSettings.ExperimentalViewArchivedChannels = true
|
||||
})
|
||||
defer th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
*cfg.TeamSettings.ExperimentalViewArchivedChannels = originalConfigVal
|
||||
})
|
||||
|
||||
th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) {
|
||||
channels, resp := client.GetAllChannels(0, 20, "")
|
||||
CheckNoError(t, resp)
|
||||
@@ -1265,10 +1256,6 @@ func TestSearchAllChannels(t *testing.T) {
|
||||
})
|
||||
CheckNoError(t, groupErr)
|
||||
|
||||
th.App.UpdateConfig(func(cfg *model.Config) {
|
||||
*cfg.TeamSettings.ExperimentalViewArchivedChannels = true
|
||||
})
|
||||
|
||||
testCases := []struct {
|
||||
Description string
|
||||
Search *model.ChannelSearch
|
||||
|
||||
Ссылка в новой задаче
Block a user