diff --git a/packages/cli/src/commands/user-management/reset.ts b/packages/cli/src/commands/user-management/reset.ts index eec5e1784a..09a5e06080 100644 --- a/packages/cli/src/commands/user-management/reset.ts +++ b/packages/cli/src/commands/user-management/reset.ts @@ -11,7 +11,6 @@ const defaultUserProps = { lastName: null, email: null, password: null, - resetPasswordToken: null, }; export class Reset extends BaseCommand { diff --git a/packages/cli/test/integration/auth.api.test.ts b/packages/cli/test/integration/auth.api.test.ts index 1484468cf3..009c2a590b 100644 --- a/packages/cli/test/integration/auth.api.test.ts +++ b/packages/cli/test/integration/auth.api.test.ts @@ -47,17 +47,8 @@ describe('POST /login', () => { expect(response.statusCode).toBe(200); - const { - id, - email, - firstName, - lastName, - password, - personalizationAnswers, - globalRole, - resetPasswordToken, - apiKey, - } = response.body.data; + const { id, email, firstName, lastName, password, personalizationAnswers, globalRole, apiKey } = + response.body.data; expect(validator.isUUID(id)).toBe(true); expect(email).toBe(owner.email); @@ -66,7 +57,6 @@ describe('POST /login', () => { expect(password).toBeUndefined(); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole).toBeDefined(); expect(globalRole.name).toBe('owner'); expect(globalRole.scope).toBe('global'); @@ -137,17 +127,8 @@ describe('GET /login', () => { expect(response.statusCode).toBe(200); - const { - id, - email, - firstName, - lastName, - password, - personalizationAnswers, - globalRole, - resetPasswordToken, - apiKey, - } = response.body.data; + const { id, email, firstName, lastName, password, personalizationAnswers, globalRole, apiKey } = + response.body.data; expect(validator.isUUID(id)).toBe(true); expect(email).toBeDefined(); @@ -156,7 +137,6 @@ describe('GET /login', () => { expect(password).toBeUndefined(); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole).toBeDefined(); expect(globalRole.name).toBe('owner'); expect(globalRole.scope).toBe('global'); @@ -173,17 +153,8 @@ describe('GET /login', () => { expect(response.statusCode).toBe(200); - const { - id, - email, - firstName, - lastName, - password, - personalizationAnswers, - globalRole, - resetPasswordToken, - apiKey, - } = response.body.data; + const { id, email, firstName, lastName, password, personalizationAnswers, globalRole, apiKey } = + response.body.data; expect(validator.isUUID(id)).toBe(true); expect(email).toBeDefined(); @@ -192,7 +163,6 @@ describe('GET /login', () => { expect(password).toBeUndefined(); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole).toBeDefined(); expect(globalRole.name).toBe('member'); expect(globalRole.scope).toBe('global'); @@ -209,17 +179,8 @@ describe('GET /login', () => { expect(response.statusCode).toBe(200); - const { - id, - email, - firstName, - lastName, - password, - personalizationAnswers, - globalRole, - resetPasswordToken, - apiKey, - } = response.body.data; + const { id, email, firstName, lastName, password, personalizationAnswers, globalRole, apiKey } = + response.body.data; expect(validator.isUUID(id)).toBe(true); expect(email).toBe(owner.email); @@ -228,7 +189,6 @@ describe('GET /login', () => { expect(password).toBeUndefined(); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole).toBeDefined(); expect(globalRole.name).toBe('owner'); expect(globalRole.scope).toBe('global'); @@ -245,17 +205,8 @@ describe('GET /login', () => { expect(response.statusCode).toBe(200); - const { - id, - email, - firstName, - lastName, - password, - personalizationAnswers, - globalRole, - resetPasswordToken, - apiKey, - } = response.body.data; + const { id, email, firstName, lastName, password, personalizationAnswers, globalRole, apiKey } = + response.body.data; expect(validator.isUUID(id)).toBe(true); expect(email).toBe(member.email); @@ -264,7 +215,6 @@ describe('GET /login', () => { expect(password).toBeUndefined(); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole).toBeDefined(); expect(globalRole.name).toBe('member'); expect(globalRole.scope).toBe('global'); diff --git a/packages/cli/test/integration/commands/reset.cmd.test.ts b/packages/cli/test/integration/commands/reset.cmd.test.ts index c1f4b3f7d8..ee41c1f45c 100644 --- a/packages/cli/test/integration/commands/reset.cmd.test.ts +++ b/packages/cli/test/integration/commands/reset.cmd.test.ts @@ -42,7 +42,5 @@ test.skip('user-management:reset should reset DB to default user state', async ( expect(user.firstName).toBeNull(); expect(user.lastName).toBeNull(); expect(user.password).toBeNull(); - expect(user.resetPasswordToken).toBeNull(); - expect(user.resetPasswordTokenExpiration).toBeNull(); expect(user.personalizationAnswers).toBeNull(); }); diff --git a/packages/cli/test/integration/me.api.test.ts b/packages/cli/test/integration/me.api.test.ts index b330a9d9cb..05371ce558 100644 --- a/packages/cli/test/integration/me.api.test.ts +++ b/packages/cli/test/integration/me.api.test.ts @@ -53,7 +53,6 @@ describe('Owner shell', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, apiKey, } = response.body.data; @@ -64,7 +63,6 @@ describe('Owner shell', () => { expect(lastName).toBe(validPayload.lastName); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(isPending).toBe(false); expect(globalRole.name).toBe('owner'); expect(globalRole.scope).toBe('global'); @@ -198,7 +196,6 @@ describe('Member', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, apiKey, } = response.body.data; @@ -209,7 +206,6 @@ describe('Member', () => { expect(lastName).toBe(validPayload.lastName); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(isPending).toBe(false); expect(globalRole.name).toBe('member'); expect(globalRole.scope).toBe('global'); @@ -334,7 +330,6 @@ describe('Owner', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, apiKey, } = response.body.data; @@ -345,7 +340,6 @@ describe('Owner', () => { expect(lastName).toBe(validPayload.lastName); expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(isPending).toBe(false); expect(globalRole.name).toBe('owner'); expect(globalRole.scope).toBe('global'); diff --git a/packages/cli/test/integration/owner.api.test.ts b/packages/cli/test/integration/owner.api.test.ts index e8227c9d5f..6332ae39c1 100644 --- a/packages/cli/test/integration/owner.api.test.ts +++ b/packages/cli/test/integration/owner.api.test.ts @@ -55,7 +55,6 @@ describe('POST /owner/setup', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, apiKey, } = response.body.data; @@ -67,7 +66,6 @@ describe('POST /owner/setup', () => { expect(personalizationAnswers).toBeNull(); expect(password).toBeUndefined(); expect(isPending).toBe(false); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole.name).toBe('owner'); expect(globalRole.scope).toBe('global'); expect(apiKey).toBeUndefined(); diff --git a/packages/cli/test/integration/publicApi/users.ee.test.ts b/packages/cli/test/integration/publicApi/users.ee.test.ts index 95b48c243e..0bc09448ba 100644 --- a/packages/cli/test/integration/publicApi/users.ee.test.ts +++ b/packages/cli/test/integration/publicApi/users.ee.test.ts @@ -73,7 +73,6 @@ describe('With license unlimited quota:users', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, createdAt, updatedAt, @@ -85,7 +84,6 @@ describe('With license unlimited quota:users', () => { expect(lastName).toBeDefined(); expect(personalizationAnswers).toBeUndefined(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(isPending).toBe(false); expect(globalRole).toBeUndefined(); expect(createdAt).toBeDefined(); @@ -144,7 +142,6 @@ describe('With license unlimited quota:users', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, createdAt, updatedAt, @@ -156,7 +153,6 @@ describe('With license unlimited quota:users', () => { expect(lastName).toBeDefined(); expect(personalizationAnswers).toBeUndefined(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(globalRole).toBeUndefined(); expect(createdAt).toBeDefined(); expect(isPending).toBeDefined(); @@ -192,7 +188,6 @@ describe('With license unlimited quota:users', () => { personalizationAnswers, globalRole, password, - resetPasswordToken, isPending, createdAt, updatedAt, @@ -204,7 +199,6 @@ describe('With license unlimited quota:users', () => { expect(lastName).toBeDefined(); expect(personalizationAnswers).toBeUndefined(); expect(password).toBeUndefined(); - expect(resetPasswordToken).toBeUndefined(); expect(isPending).toBe(false); expect(globalRole).toBeUndefined(); expect(createdAt).toBeDefined();