MM-54502 - Update regex to force first character to be alpha (#24675)

Automatic Merge
Этот коммит содержится в:
Scott Bishel
2024-07-31 08:27:52 -06:00
коммит произвёл GitHub
родитель 5bfb32c504
Коммит 08ed72f060
33 изменённых файлов: 286 добавлений и 280 удалений

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

@@ -299,7 +299,7 @@ func TestAddUserToGroupSyncables(t *testing.T) {
id := model.NewId()
user := &model.User{
Email: "test@localhost",
Username: model.NewId(),
Username: model.NewUsername(),
AuthData: &id,
AuthService: model.UserAuthServiceLdap,
}

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

@@ -1832,14 +1832,14 @@ func TestGetUsersByIdsWithOptions(t *testing.T) {
defer th.TearDown()
// Users before the timestamp shouldn't be returned
user1, appErr := th.App.CreateUser(th.Context, &model.User{Email: th.GenerateTestEmail(), Username: model.NewId(), Password: model.NewId()})
user1, appErr := th.App.CreateUser(th.Context, &model.User{Email: th.GenerateTestEmail(), Username: model.NewUsername(), Password: model.NewId()})
require.Nil(t, appErr)
user2, appErr := th.App.CreateUser(th.Context, &model.User{Email: th.GenerateTestEmail(), Username: model.NewId(), Password: model.NewId()})
user2, appErr := th.App.CreateUser(th.Context, &model.User{Email: th.GenerateTestEmail(), Username: model.NewUsername(), Password: model.NewId()})
require.Nil(t, appErr)
// Users not in the list of IDs shouldn't be returned
_, appErr = th.App.CreateUser(th.Context, &model.User{Email: th.GenerateTestEmail(), Username: model.NewId(), Password: model.NewId()})
_, appErr = th.App.CreateUser(th.Context, &model.User{Email: th.GenerateTestEmail(), Username: model.NewUsername(), Password: model.NewId()})
require.Nil(t, appErr)
users, _, err := th.Client.GetUsersByIdsWithOptions(context.Background(), []string{user1.Id, user2.Id}, &model.UserGetByIdsOptions{

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

@@ -161,13 +161,13 @@ func TestAPIRestrictedViewMembers(t *testing.T) {
{
"Get not existing user without restrictions",
"",
model.NewId(),
model.NewUsername(),
"app.user.get_by_username.app_error",
},
{
"Get not existing user with restrictions to teams",
"teams",
model.NewId(),
model.NewUsername(),
"api.context.permissions.app_error",
},
{
@@ -185,7 +185,7 @@ func TestAPIRestrictedViewMembers(t *testing.T) {
{
"Get not existing user with restrictions to channels",
"channels",
model.NewId(),
model.NewUsername(),
"api.context.permissions.app_error",
},
{