MM-42201: Enforce group is not the same as username. (#19660)

* MM-42201: Enforce group is not the same as username.

* MM-42201: Adjust test for change to translation id.
Этот коммит содержится в:
mkraft
2022-03-08 09:14:22 -05:00
коммит произвёл GitHub
родитель e49cc0313a
Коммит 21f1d2aabc
7 изменённых файлов: 149 добавлений и 0 удалений

Просмотреть файл

@@ -119,6 +119,16 @@ func TestCreateGroup(t *testing.T) {
require.NoError(t, err)
CheckCreatedStatus(t, response)
usernameGroup := &model.Group{
DisplayName: "dn_" + model.NewId(),
Name: &th.BasicUser.Username,
Source: model.GroupSourceCustom,
AllowReference: true,
}
_, response, err = th.SystemAdminClient.CreateGroup(usernameGroup)
require.Error(t, err)
CheckBadRequestStatus(t, response)
unReferenceableCustomGroup := &model.Group{
DisplayName: "dn_" + model.NewId(),
Name: model.NewString("name" + model.NewId()),