MM-20345: Fixing etag problem not reloading all users when needed (#13640)
* MM-20345: Fixing etag problem not reloading all users when needed * Fixing tests
Этот коммит содержится в:
коммит произвёл
Miguel de la Cruz
родитель
50e9aa01c3
Коммит
8861d0cb33
@@ -605,11 +605,6 @@ func getUsers(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
profiles, err = c.App.GetUsersInChannelPage(inChannelId, c.Params.Page, c.Params.PerPage, c.IsSystemAdmin())
|
||||
}
|
||||
} else {
|
||||
etag = c.App.GetUsersEtag(restrictions.Hash())
|
||||
if c.HandleEtag(etag, "Get Users", w, r) {
|
||||
return
|
||||
}
|
||||
|
||||
userGetOptions, err = c.App.RestrictUsersGetByPermissions(c.App.Session.UserId, userGetOptions)
|
||||
if err != nil {
|
||||
c.Err = err
|
||||
|
||||
@@ -1847,9 +1847,6 @@ func TestGetUsers(t *testing.T) {
|
||||
CheckUserSanitization(t, u)
|
||||
}
|
||||
|
||||
rusers, resp = th.Client.GetUsers(0, 60, resp.Etag)
|
||||
CheckEtag(t, rusers, resp)
|
||||
|
||||
rusers, resp = th.Client.GetUsers(0, 1, "")
|
||||
CheckNoError(t, resp)
|
||||
require.Len(t, rusers, 1, "should be 1 per page")
|
||||
|
||||
Ссылка в новой задаче
Block a user