MM-58349 Don't allow remote user to create sessions or reset password (#27215)
Automatic Merge
Этот коммит содержится в:
@@ -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")
|
||||
})
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user