[MM-32281] SqlRoleStore/GetByName: add context to allow read from master (#17176)
* role_store/GetByName: add context * propagate context in the app layer * propagate context in the app layer * add missing import Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9eceeaa8db
Коммит
28ff4dc8d0
@@ -4,6 +4,7 @@
|
||||
package api4
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"testing"
|
||||
@@ -596,7 +597,7 @@ func TestPatchGroupChannel(t *testing.T) {
|
||||
assert.NotNil(t, groupSyncable)
|
||||
assert.True(t, groupSyncable.AutoAdd)
|
||||
|
||||
role, err := th.App.GetRoleByName("channel_user")
|
||||
role, err := th.App.GetRoleByName(context.Background(), "channel_user")
|
||||
require.Nil(t, err)
|
||||
originalPermissions := role.Permissions
|
||||
_, err = th.App.PatchRole(role, &model.RolePatch{Permissions: &[]string{}})
|
||||
|
||||
Ссылка в новой задаче
Block a user