[MM-44489] Cloud limits: enforcing files (#20703)

* Update last accessible file time

* Filter fileInfos

* Set inaccessible header

* Fix lint issue

* Fix lint issue

* Fix i18n

* add nil check

* Fix merge conflicts

* Add helper functions to clear out inaccessible files content

* Remove content for inaccessible files

* Fix typo

* wip

* Remove InaccessibleContent field, instead use Archived

* Add store tests

* Add tests

* Add separate funcs to ignore cloud limits

* Use separate query for MySql

* Use GetReplicaX

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Vishal
2022-09-28 22:22:53 +05:30
коммит произвёл GitHub
родитель b9834a2fc2
Коммит f5f036d94b
27 изменённых файлов: 984 добавлений и 21 удалений

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

@@ -219,7 +219,7 @@ func TestAttachFilesToPost(t *testing.T) {
appErr := th.App.attachFilesToPost(post)
assert.Nil(t, appErr)
infos, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
infos, _, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
assert.Nil(t, appErr)
assert.Len(t, infos, 2)
})
@@ -247,7 +247,7 @@ func TestAttachFilesToPost(t *testing.T) {
appErr := th.App.attachFilesToPost(post)
assert.Nil(t, appErr)
infos, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
infos, _, appErr := th.App.GetFileInfosForPost(post.Id, false, false)
assert.Nil(t, appErr)
assert.Len(t, infos, 1)
assert.Equal(t, info2.Id, infos[0].Id)