1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-26 13:48:33 +02:00

chore: don't include passwordLink if it's unleashUrl (#10029)

https://linear.app/unleash/issue/2-3572/fix-dont-include-passwordlink-if-its-the-same-as-unleashurl

In case we don't have password auth enabled (`passwordLink ===
unleashUrl`), we should see the alternative branch in our getting
started email:


e52fcd11e0/src/mailtemplates/getting-started-new/getting-started-new.html.mustache (L40-L45)

This change helps us validate this behavior within the
`newGettingStartedEmail`. If it works correctly for both cases (password
auth enabled/disabled) we can probably clean this up as part of our flag
removal.
This commit is contained in:
Nuno Góis 2025-05-26 14:57:06 +01:00 committed by GitHub
parent e52fcd11e0
commit 45434109a9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -430,6 +430,9 @@ export class EmailService {
let gettingStartedTemplate = 'getting-started';
if (this.flagResolver.isEnabled('newGettingStartedEmail')) {
gettingStartedTemplate = 'getting-started-new';
if (passwordLink === unleashUrl) {
delete context.passwordLink;
}
}
const bodyHtml = await this.compileTemplate(