diff --git a/back/methods/vn-user/specs/sign-in.spec.js b/back/methods/vn-user/specs/sign-in.spec.js index a6e89d528..c3ff2d7db 100644 --- a/back/methods/vn-user/specs/sign-in.spec.js +++ b/back/methods/vn-user/specs/sign-in.spec.js @@ -71,8 +71,6 @@ fdescribe('VnUser Sign-in()', () => { expect(error).toBeDefined(); expect(error.statusCode).toBe(403); expect(error.message).toBe('REQUIRES_2FA'); - - await employee.updateAttribute('twoFactor', null); }); }); diff --git a/back/methods/vn-user/specs/validate-auth.spec.js b/back/methods/vn-user/specs/validate-auth.spec.js index a58837e7b..8018bd3e1 100644 --- a/back/methods/vn-user/specs/validate-auth.spec.js +++ b/back/methods/vn-user/specs/validate-auth.spec.js @@ -1,6 +1,6 @@ const {models} = require('vn-loopback/server/server'); -fdescribe('VnUser validate-auth()', () => { +describe('VnUser validate-auth()', () => { describe('validateAuth', () => { it('should signin if data is correct', async() => { await models.AuthCode.create({ diff --git a/front/salix/components/change-password/index.html b/front/salix/components/change-password/index.html index c22c261f5..04f66976e 100644 --- a/front/salix/components/change-password/index.html +++ b/front/salix/components/change-password/index.html @@ -22,7 +22,7 @@ autocomplete="false"> { +describe('account changePassword()', () => { const ctx = {req: {accessToken: {userId: 70}}}; const unauthCtx = { req: { diff --git a/modules/account/back/models/account.json b/modules/account/back/models/account.json index 8fe3e88f9..3c22521cb 100644 --- a/modules/account/back/models/account.json +++ b/modules/account/back/models/account.json @@ -37,6 +37,13 @@ "principalType": "ROLE", "principalId": "$authenticated", "permission": "ALLOW" + }, + { + "property": "changePassword", + "accessType": "EXECUTE", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" } ] }