MM-15162: Changes for LDAP groups removals. (#10701)
* MM-15162: Changes for LDAP groups removals phase. * MM-15162: Adds missing translation. * MM-15162: Fixes tests. * MM-15162: Removes some confusing branching. * MM-15162: Make permission less restrictive. * MM-15162: Moves counting to the DB tier. * MM-15162: Moves CountGroupsByTeam into own store method. * MM-15162: Adds count to tests. * MM-15162: Fix for wrong cast type. * MM-15162: Fix for possible null SchemeGuest column. * MM-15162: Fixes bug whereby permissions error didn't return. * MM-15162: Changes for LDAP groups removals phase. * MM-15162: Adds missing translation. * MM-15162: Fixes tests. * MM-15162: Removes some confusing branching. * MM-15162: Make permission less restrictive. * MM-15162: Moves counting to the DB tier. * MM-15162: Moves CountGroupsByTeam into own store method. * MM-15162: Adds count to tests. * MM-15162: Fix for wrong cast type. * MM-15162: Fix for possible null SchemeGuest column. * MM-15162: Fixes bug whereby permissions error didn't return. * MM-15162: Adds missing translation blocking enterprise build. * MM-15162: Update to group commands.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
74c7c46a7d
Коммит
480fffd3cc
@@ -241,11 +241,21 @@ func TestGetGroupsByTeam(t *testing.T) {
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, gs)
|
||||
|
||||
groups, err := th.App.GetGroupsByTeam(th.BasicTeam.Id, 0, 60)
|
||||
groups, _, err := th.App.GetGroupsByTeam(th.BasicTeam.Id, model.GroupSearchOpts{})
|
||||
require.Nil(t, err)
|
||||
require.ElementsMatch(t, []*model.Group{group}, groups)
|
||||
|
||||
groups, err = th.App.GetGroupsByTeam(model.NewId(), 0, 60)
|
||||
groups, _, err = th.App.GetGroupsByTeam(model.NewId(), model.GroupSearchOpts{})
|
||||
require.Nil(t, err)
|
||||
require.Empty(t, groups)
|
||||
}
|
||||
|
||||
func TestGetGroups(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
group := th.CreateGroup()
|
||||
|
||||
groups, err := th.App.GetGroups(0, 60, model.GroupSearchOpts{})
|
||||
require.Nil(t, err)
|
||||
require.ElementsMatch(t, []*model.Group{group}, groups)
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user