mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(cli): password reset should trigger internal and external hooks (#4066)
Ticket: N8N-4586
This commit is contained in:
committed by
GitHub
parent
eebc51ec7c
commit
12507d39d6
@@ -215,6 +215,13 @@ export function passwordResetNamespace(this: N8nApp): void {
|
|||||||
Logger.info('User password updated successfully', { userId });
|
Logger.info('User password updated successfully', { userId });
|
||||||
|
|
||||||
await issueCookie(res, user);
|
await issueCookie(res, user);
|
||||||
|
|
||||||
|
void InternalHooksManager.getInstance().onUserUpdate({
|
||||||
|
user_id: userId,
|
||||||
|
fields_changed: ['password'],
|
||||||
|
});
|
||||||
|
|
||||||
|
await this.externalHooks.run('user.password.update', [user.email, password]);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ export async function initTestServer({
|
|||||||
if (
|
if (
|
||||||
endpointGroups.includes('credentials') ||
|
endpointGroups.includes('credentials') ||
|
||||||
endpointGroups.includes('me') ||
|
endpointGroups.includes('me') ||
|
||||||
endpointGroups.includes('users')
|
endpointGroups.includes('users') ||
|
||||||
|
endpointGroups.includes('passwordReset')
|
||||||
) {
|
) {
|
||||||
testServer.externalHooks = ExternalHooks();
|
testServer.externalHooks = ExternalHooks();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user