MM-58349 Don't allow remote user to create sessions or reset password (#27215)

Automatic Merge
Этот коммит содержится в:
Doug Lauder
2024-06-03 10:11:30 -04:00
коммит произвёл GitHub
родитель 4ec50a7ddd
Коммит d40cc68b1c
4 изменённых файлов: 36 добавлений и 3 удалений

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

@@ -3875,10 +3875,11 @@ func TestLogin(t *testing.T) {
ruser, appErr := th.App.CreateUser(th.Context, &user)
require.Nil(t, appErr)
// remote user cannot reset password
_, err := th.SystemAdminClient.UpdateUserPassword(context.Background(), ruser.Id, "", "password")
require.NoError(t, err)
require.Error(t, err)
_, _, err = th.Client.Login(context.Background(), ruser.Email, "password")
_, _, err = th.Client.Login(context.Background(), ruser.Email, "hello1")
CheckErrorID(t, err, "api.user.login.remote_users.login.error")
})