Skip to content

Commit

Permalink
If the email address is not verified, we should not consider its visi…
Browse files Browse the repository at this point in the history
…bility for the domain visibility (#2325)
  • Loading branch information
amontenegro authored Aug 13, 2024
1 parent 4bc2eb5 commit 771ab57
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,14 +596,13 @@ export class ModalEmailComponent implements OnInit, OnDestroy {
visibilities: VisibilityStrings[] = []
): void {
if (visibilities.length === 0) {
Object.keys(this.emailsForm.controls).forEach((controlKey) => {
if (controlKey.startsWith('emailInput')) {
const control = this.emailsForm.get(controlKey)
if (control.value.email.split('@')[1] === domain) {
visibilities.push(control.value.visibility)
}
this.emails.forEach((email) => {
if(email.verified) {
if(email.value.split('@')[1] === domain) {
visibilities.push(email.visibility)
}
}
})
});
}

const leastPermissiveVisibility =
Expand Down

0 comments on commit 771ab57

Please sign in to comment.