mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
refactor: Remove all references to the resetPasswordToken field (no-changelog) (#6751)
refactor: remove all references to the resetPasswordToken field (no-changelog)
This commit is contained in:
parent
feac369f6c
commit
e6903a87b5
|
@ -11,7 +11,6 @@ const defaultUserProps = {
|
|||
lastName: null,
|
||||
email: null,
|
||||
password: null,
|
||||
resetPasswordToken: null,
|
||||
};
|
||||
|
||||
export class Reset extends BaseCommand {
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue