[MM-54434] Use job.Logger to capture ldap logs (#24493)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
afaf41b587
Коммит
aad25be4e1
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin/plugintest/mock"
|
||||
"github.com/mattermost/mattermost/server/public/shared/i18n"
|
||||
"github.com/mattermost/mattermost/server/public/shared/request"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/app"
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils/testutils"
|
||||
"github.com/mattermost/mattermost/server/v8/einterfaces/mocks"
|
||||
@@ -3196,14 +3195,12 @@ func TestValidateUserPermissionsOnChannels(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
ctx := request.EmptyContext(th.TestLogger)
|
||||
|
||||
t.Run("User WITH permissions on private channel CAN invite members to it", func(t *testing.T) {
|
||||
channelIds := []string{th.BasicChannel.Id, th.BasicPrivateChannel.Id}
|
||||
|
||||
require.Len(t, channelIds, 2)
|
||||
|
||||
channelIds = th.App.ValidateUserPermissionsOnChannels(ctx, th.BasicUser.Id, channelIds)
|
||||
channelIds = th.App.ValidateUserPermissionsOnChannels(th.Context, th.BasicUser.Id, channelIds)
|
||||
|
||||
// basicUser has permission onBasicChannel and BasicPrivateChannel so he can invite to both channels
|
||||
require.Len(t, channelIds, 2)
|
||||
@@ -3215,7 +3212,7 @@ func TestValidateUserPermissionsOnChannels(t *testing.T) {
|
||||
|
||||
require.Len(t, channelIds, 2)
|
||||
|
||||
channelIds = th.App.ValidateUserPermissionsOnChannels(ctx, th.BasicUser.Id, channelIds)
|
||||
channelIds = th.App.ValidateUserPermissionsOnChannels(th.Context, th.BasicUser.Id, channelIds)
|
||||
|
||||
// basicUser DOES NOT have permission on BasicPrivateChannel2 so he can only invite to BasicChannel
|
||||
require.Len(t, channelIds, 1)
|
||||
|
||||
Ссылка в новой задаче
Block a user