From 9b58dbff8484b18fc240bb80577e14d5540740d7 Mon Sep 17 00:00:00 2001 From: cryptalith Date: Fri, 21 Aug 2026 19:13:21 -0600 Subject: [PATCH] PD-6181 Note other verified emails on the password reset confirmation --- .../password-recovery.component.html | 6 +++- .../password-recovery.component.spec.ts | 31 +++++++++++++++++++ .../password-recovery.component.ts | 8 +++++ src/locale/messages.lr.xlf | 12 +++++-- src/locale/messages.rl.xlf | 12 +++++-- src/locale/messages.xlf | 11 +++++-- src/locale/messages.xx.xlf | 12 +++++-- 7 files changed, 83 insertions(+), 9 deletions(-) diff --git a/src/app/password-recovery/pages/password-recovery/password-recovery.component.html b/src/app/password-recovery/pages/password-recovery/password-recovery.component.html index 3219a6e9bf..f1f9e9d706 100644 --- a/src/app/password-recovery/pages/password-recovery/password-recovery.component.html +++ b/src/app/password-recovery/pages/password-recovery/password-recovery.component.html @@ -162,7 +162,11 @@ } @if (submitted) {
We have sent a recovery email to {{ recoveryForm.get('email').value }} + > {{ recoveryForm.get('email').value }}@if (isPasswordReset) { and any other verified email addresses on your account}

diff --git a/src/app/password-recovery/pages/password-recovery/password-recovery.component.spec.ts b/src/app/password-recovery/pages/password-recovery/password-recovery.component.spec.ts index ddbddc4341..567d0a46f6 100644 --- a/src/app/password-recovery/pages/password-recovery/password-recovery.component.spec.ts +++ b/src/app/password-recovery/pages/password-recovery/password-recovery.component.spec.ts @@ -56,4 +56,35 @@ describe('PasswordRecoveryComponent', () => { it('should create', () => { expect(component).toBeTruthy() }) + + /** Renders the confirmation branch for the given recovery type and returns its text. */ + function confirmationTextFor(recoveryType: string): string { + component.recoveryForm.get('recoveryType').setValue(recoveryType) + component.recoveryForm.get('email').setValue('josiah_carberry@brown.edu') + component.submitted = true + fixture.detectChanges() + return fixture.nativeElement.textContent + } + + it('mentions the other verified addresses after a password reset', () => { + expect(confirmationTextFor('password')).toContain( + 'and any other verified email addresses on your account' + ) + }) + + it('does not mention other verified addresses on the forgot-iD path', () => { + // /forgot-id.json still emails a single address, so the fan out wording would be a lie here. + expect(confirmationTextFor('orcidId')).not.toContain( + 'and any other verified email addresses on your account' + ) + }) + + it('still shows the submitted email in both modes', () => { + expect(confirmationTextFor('password')).toContain( + 'josiah_carberry@brown.edu' + ) + expect(confirmationTextFor('orcidId')).toContain( + 'josiah_carberry@brown.edu' + ) + }) }) diff --git a/src/app/password-recovery/pages/password-recovery/password-recovery.component.ts b/src/app/password-recovery/pages/password-recovery/password-recovery.component.ts index a97d6b3756..d30cbb83f1 100644 --- a/src/app/password-recovery/pages/password-recovery/password-recovery.component.ts +++ b/src/app/password-recovery/pages/password-recovery/password-recovery.component.ts @@ -25,6 +25,14 @@ export class PasswordRecoveryComponent implements OnInit { ariaLabelMyOrcidAccountPassword = $localize`:@@recovery.myOrcidAccountPassword:my ORCID account password` ariaLabelMy16DigitOrcidId = $localize`:@@recovery.my16DigitOrcidId:my 16-digit ORCID iD` + /** + * The confirmation block is shared with the "remind me my ORCID iD" flow, which still emails a + * single address, so only the password reset path may claim the fan out. + */ + get isPasswordReset(): boolean { + return this.recoveryForm?.get('recoveryType')?.value === 'password' + } + ngOnInit() { this.recoveryForm = new FormGroup({ recoveryType: new FormControl('password', Validators.required), diff --git a/src/locale/messages.lr.xlf b/src/locale/messages.lr.xlf index c6249c87bd..35607c6135 100644 --- a/src/locale/messages.lr.xlf +++ b/src/locale/messages.lr.xlf @@ -11811,11 +11811,19 @@ LR + + and any other verified email addresses on your account + + src/app/password-recovery/pages/password-recovery/password-recovery.component.html + 168 + + LR + If you do not receive the recovery email within 10 minutes please check your spam folder. src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 168,171 + 172,175 LR @@ -11823,7 +11831,7 @@ Back to sign in src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 178 + 182 LR diff --git a/src/locale/messages.rl.xlf b/src/locale/messages.rl.xlf index 6952abf79c..be86e58156 100644 --- a/src/locale/messages.rl.xlf +++ b/src/locale/messages.rl.xlf @@ -11811,11 +11811,19 @@ RL + + and any other verified email addresses on your account + + src/app/password-recovery/pages/password-recovery/password-recovery.component.html + 168 + + RL + If you do not receive the recovery email within 10 minutes please check your spam folder. src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 168,171 + 172,175 RL @@ -11823,7 +11831,7 @@ Back to sign in src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 178 + 182 RL diff --git a/src/locale/messages.xlf b/src/locale/messages.xlf index 337d12fbbb..69b6593fe9 100644 --- a/src/locale/messages.xlf +++ b/src/locale/messages.xlf @@ -10604,18 +10604,25 @@ 164 + + and any other verified email addresses on your account + + src/app/password-recovery/pages/password-recovery/password-recovery.component.html + 168 + + If you do not receive the recovery email within 10 minutes please check your spam folder. src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 168,171 + 172,175 Back to sign in src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 178 + 182 diff --git a/src/locale/messages.xx.xlf b/src/locale/messages.xx.xlf index 11c67e440c..c941ef4367 100644 --- a/src/locale/messages.xx.xlf +++ b/src/locale/messages.xx.xlf @@ -11811,11 +11811,19 @@ X + + and any other verified email addresses on your account + + src/app/password-recovery/pages/password-recovery/password-recovery.component.html + 168 + + X + If you do not receive the recovery email within 10 minutes please check your spam folder. src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 168,171 + 172,175 X @@ -11823,7 +11831,7 @@ Back to sign in src/app/password-recovery/pages/password-recovery/password-recovery.component.html - 178 + 182 X