From 3bf25e5759ce1169c83d03a1c9c46c71aebcdd38 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 23 Feb 2024 09:31:01 +0100 Subject: [PATCH] fix: refs #6744 locale --- loopback/locale/en.json | 2 +- loopback/locale/es.json | 2 +- modules/account/back/models/account.js | 2 +- modules/worker/back/methods/worker/specs/setPassword.spec.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 39596467c..efcf0ef31 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -210,5 +210,5 @@ "CountryFK cannot be empty": "Country cannot be empty", "You are not allowed to modify the alias": "You are not allowed to modify the alias", "You already have the mailAlias": "You already have the mailAlias", - "The email has been already verified": "The email has been already verified" + "This password can only be changed by the user themselves": "This password can only be changed by the user themselves" } diff --git a/loopback/locale/es.json b/loopback/locale/es.json index d36348472..64832553b 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -345,5 +345,5 @@ "Cmr file does not exist": "El archivo del cmr no existe", "You are not allowed to modify the alias": "No estás autorizado a modificar el alias", "No tickets to invoice": "No hay tickets para facturar", - "The email has been already verified": "El correo ya ha sido verificado" + "This password can only be changed by the user themselves": "Esta contraseña solo puede ser modificada por el propio usuario" } diff --git a/modules/account/back/models/account.js b/modules/account/back/models/account.js index 7c97711d0..dd04182f6 100644 --- a/modules/account/back/models/account.js +++ b/modules/account/back/models/account.js @@ -13,7 +13,7 @@ module.exports = Self => { Self.setUnverifiedPassword = async(id, pass, options) => { const user = await models.VnUser.findById(id, null, options); - if (user.emailVerified) throw new ForbiddenError('The email has been already verified'); + if (user.emailVerified) throw new ForbiddenError('This password can only be changed by the user themselves'); await models.VnUser.setPassword(id, pass, options); await user.updateAttribute('emailVerified', true, options); diff --git a/modules/worker/back/methods/worker/specs/setPassword.spec.js b/modules/worker/back/methods/worker/specs/setPassword.spec.js index d2daec103..03cbee03b 100644 --- a/modules/worker/back/methods/worker/specs/setPassword.spec.js +++ b/modules/worker/back/methods/worker/specs/setPassword.spec.js @@ -42,7 +42,7 @@ describe('worker setPassword()', () => { await tx.rollback(); } catch (e) { - expect(e.message).toEqual(`The email has been already verified`); + expect(e.message).toEqual(`This password can only be changed by the user themselves`); await tx.rollback(); } });