From a58e91b659cfeebfb15bde228310238327d59ae2 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Mon, 11 Nov 2024 11:51:18 -0600 Subject: [PATCH] 9489-qa-email-domains-interstitial-shown-to-user-with-at-least-one-public-email-domain --- src/app/authorize/pages/authorize/authorize.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/authorize/pages/authorize/authorize.component.ts b/src/app/authorize/pages/authorize/authorize.component.ts index 3cc104ae5..07673a147 100644 --- a/src/app/authorize/pages/authorize/authorize.component.ts +++ b/src/app/authorize/pages/authorize/authorize.component.ts @@ -28,6 +28,7 @@ export class AuthorizeComponent { domainInterstitialHasBeenViewed: boolean userIsNotImpersonating: boolean insidePopUpWindows: boolean + userHasPublicDomains: boolean constructor( _user: UserService, @@ -75,11 +76,15 @@ export class AuthorizeComponent { tap((value) => { this.originalEmailsBackendCopy = cloneDeep(value) this.userHasPrivateDomains = this.userHasPrivateEmails(value) + this.userHasPublicDomains= this.userHasPublicEmails(value) }), first() ) .subscribe() } + userHasPublicEmails(value: EmailsEndpoint): any { + return !!value.emailDomains.find((domain) => domain.visibility === 'PUBLIC') + } userHasPrivateEmails(value: EmailsEndpoint): boolean { return !!value.emailDomains.find((domain) => domain.visibility !== 'PUBLIC') @@ -90,6 +95,7 @@ export class AuthorizeComponent { if ( url && this.userHasPrivateDomains && + !this.userHasPublicDomains && this.oauthDomainsInterstitialEnabled && !this.domainInterstitialHasBeenViewed && this.userIsNotImpersonating &&