[MM-63355] Add AuthData to mmctl user search output (#30478)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
04a60b6609
Коммит
cfc1503d62
@@ -2795,13 +2795,6 @@ func testUserStoreSearch(t *testing.T, rctx request.CTX, ss store.Store) {
|
||||
require.NoError(t, err)
|
||||
defer func() { require.NoError(t, ss.User().PermanentDelete(rctx, u3.Id)) }()
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := new(string)
|
||||
*nilAuthData = ""
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
|
||||
t1id := model.NewId()
|
||||
_, nErr := ss.Team().SaveMember(rctx, &model.TeamMember{TeamId: t1id, UserId: u1.Id, SchemeAdmin: true, SchemeUser: true}, -1)
|
||||
require.NoError(t, nErr)
|
||||
@@ -2981,14 +2974,6 @@ func testUserStoreSearchNotInChannel(t *testing.T, rctx request.CTX, ss store.St
|
||||
_, nErr = ss.Team().SaveMember(rctx, &model.TeamMember{TeamId: tid, UserId: u3.Id}, -1)
|
||||
require.NoError(t, nErr)
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := new(string)
|
||||
*nilAuthData = ""
|
||||
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
|
||||
ch1 := model.Channel{
|
||||
TeamId: tid,
|
||||
DisplayName: "NameName",
|
||||
@@ -3210,14 +3195,6 @@ func testUserStoreSearchInChannel(t *testing.T, rctx request.CTX, ss store.Store
|
||||
_, nErr = ss.Team().SaveMember(rctx, &model.TeamMember{TeamId: tid, UserId: u3.Id}, -1)
|
||||
require.NoError(t, nErr)
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := new(string)
|
||||
*nilAuthData = ""
|
||||
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
|
||||
ch1 := model.Channel{
|
||||
TeamId: tid,
|
||||
DisplayName: "NameName",
|
||||
@@ -3481,17 +3458,6 @@ func testUserStoreSearchNotInTeam(t *testing.T, rctx request.CTX, ss store.Store
|
||||
_, nErr = ss.Team().SaveMember(rctx, &model.TeamMember{TeamId: teamID2, UserId: u4.Id}, -1)
|
||||
require.NoError(t, nErr)
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := new(string)
|
||||
*nilAuthData = ""
|
||||
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
u4.AuthData = nilAuthData
|
||||
u5.AuthData = nilAuthData
|
||||
u6.AuthData = nilAuthData
|
||||
|
||||
testCases := []struct {
|
||||
Description string
|
||||
TeamID string
|
||||
@@ -3629,14 +3595,6 @@ func testUserStoreSearchWithoutTeam(t *testing.T, rctx request.CTX, ss store.Sto
|
||||
_, nErr = ss.Team().SaveMember(rctx, &model.TeamMember{TeamId: tid, UserId: u3.Id}, -1)
|
||||
require.NoError(t, nErr)
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := new(string)
|
||||
*nilAuthData = ""
|
||||
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
|
||||
testCases := []struct {
|
||||
Description string
|
||||
Term string
|
||||
@@ -3721,13 +3679,6 @@ func testUserStoreSearchInGroup(t *testing.T, rctx request.CTX, ss store.Store)
|
||||
require.NoError(t, err)
|
||||
defer func() { require.NoError(t, ss.User().PermanentDelete(rctx, u3.Id)) }()
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := model.NewPointer("")
|
||||
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
|
||||
g1 := &model.Group{
|
||||
Name: model.NewPointer(NewTestID()),
|
||||
DisplayName: NewTestID(),
|
||||
@@ -3864,13 +3815,6 @@ func testUserStoreSearchNotInGroup(t *testing.T, rctx request.CTX, ss store.Stor
|
||||
require.NoError(t, err)
|
||||
defer func() { require.NoError(t, ss.User().PermanentDelete(rctx, u3.Id)) }()
|
||||
|
||||
// The users returned from the database will have AuthData as an empty string.
|
||||
nilAuthData := model.NewPointer("")
|
||||
|
||||
u1.AuthData = nilAuthData
|
||||
u2.AuthData = nilAuthData
|
||||
u3.AuthData = nilAuthData
|
||||
|
||||
g1 := &model.Group{
|
||||
Name: model.NewPointer(NewTestID()),
|
||||
DisplayName: NewTestID(),
|
||||
|
||||
Ссылка в новой задаче
Block a user