[MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel (#27409)

* [MM-58492][MM-58523] Fixed some access control bugs around archived channels by replacing the permission check with HasPermissionToReadChannel

* Fix lint, add ChannelId to uploads

* Fix MMCTL tests and remove unnecessary check for the error message that doesn't work anyways

* Include channel map for getting flagged posts

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Devin Binnie
2024-07-29 10:05:20 -04:00
коммит произвёл GitHub
родитель 6ddf796384
Коммит aa85a13c8f
17 изменённых файлов: 162 добавлений и 43 удалений

Просмотреть файл

@@ -334,7 +334,7 @@ func TestSubmitDialog(t *testing.T) {
submit.ChannelId = model.NewId()
submitResp, resp, err = client.SubmitInteractiveDialog(context.Background(), submit)
require.Error(t, err)
CheckForbiddenStatus(t, resp)
CheckNotFoundStatus(t, resp)
assert.Nil(t, submitResp)
submit.URL = ts.URL