From e6382ab31708dd29d61f3bc8cf1c91a60426fcb6 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 27 Nov 2024 14:16:29 -0600 Subject: [PATCH 1/3] 9499-email-domains-interstitial-registry-sign-in --- .../pages/authorize/authorize.component.ts | 2 +- .../login-interstitials.service.ts | 56 +++++++++---------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/app/authorize/pages/authorize/authorize.component.ts b/src/app/authorize/pages/authorize/authorize.component.ts index 181431f82..30ccbf22f 100644 --- a/src/app/authorize/pages/authorize/authorize.component.ts +++ b/src/app/authorize/pages/authorize/authorize.component.ts @@ -65,7 +65,7 @@ export class AuthorizeComponent { }) this._togglz - .getStateOf('DOMAINS_INTERSTITIAL') + .getStateOf('OAUTH_DOMAINS_INTERSTITIAL') .pipe(take(1)) .subscribe((value) => { this.oauthDomainsInterstitialEnabled = value diff --git a/src/app/core/login-interstitials/login-interstitials.service.ts b/src/app/core/login-interstitials/login-interstitials.service.ts index 700664b36..4b1ddfc55 100644 --- a/src/app/core/login-interstitials/login-interstitials.service.ts +++ b/src/app/core/login-interstitials/login-interstitials.service.ts @@ -27,7 +27,7 @@ export class LoginInterstitialsService { this.interstitialService .getInterstitialsViewed('DOMAIN_INTERSTITIAL') .subscribe((viewed) => { - this.alreadySawSignDomainInterstitial = viewed + // this.alreadySawSignDomainInterstitial = viewed }) this.toggleService .getStateOf('LOGIN_DOMAINS_INTERSTITIAL') @@ -39,38 +39,38 @@ export class LoginInterstitialsService { checkLoginInterstitials(userRecord: UserRecord): Observable | void { if ( userRecord?.userInfo && - userRecord?.emails?.emailDomains && + userRecord?.emails && !this.alreadyCheckLoginInterstitials ) { this.alreadyCheckLoginInterstitials = true - const isNotImpersonating = - userRecord.userInfo.REAL_USER_ORCID === - userRecord.userInfo.EFFECTIVE_USER_ORCID + // const isNotImpersonating = + // userRecord.userInfo.REAL_USER_ORCID === + // userRecord.userInfo.EFFECTIVE_USER_ORCID - if ( - isNotImpersonating && - !this.userHasPublicDomains(userRecord.emails) && - this.userHasPrivateDomains(userRecord.emails) && - this.loginDomainsInterstitialEnabled && - !this.alreadySawSignDomainInterstitial - ) { - this.alreadySawSignDomainInterstitial = true - this.interstitialService - .setInterstitialsViewed('DOMAIN_INTERSTITIAL') - .subscribe() - const data: ShareEmailsDomainsComponentDialogInput = { - userEmailsJson: userRecord.emails, - } - - const dialog = this._matDialog.open(ShareEmailsDomainsDialogComponent, { - data, - width: '580px', - disableClose: true, - autoFocus: false, - restoreFocus: false, - }) - return dialog.afterClosed() + // if ( + // isNotImpersonating && + // !this.userHasPublicDomains(userRecord.emails) && + // this.userHasPrivateDomains(userRecord.emails) && + // this.loginDomainsInterstitialEnabled && + // !this.alreadySawSignDomainInterstitial + // ) { + this.alreadySawSignDomainInterstitial = true + this.interstitialService + .setInterstitialsViewed('DOMAIN_INTERSTITIAL') + .subscribe() + const data: ShareEmailsDomainsComponentDialogInput = { + userEmailsJson: userRecord.emails, } + + const dialog = this._matDialog.open(ShareEmailsDomainsDialogComponent, { + data, + width: '580px', + disableClose: true, + autoFocus: false, + restoreFocus: false, + }) + return dialog.afterClosed() + // } } } From 3c79045a30984dc347ef6e5d5bdf1307532aa58d Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 27 Nov 2024 14:17:45 -0600 Subject: [PATCH 2/3] 9499-email-domains-interstitial-registry-sign-in --- .../login-interstitials.service.ts | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/app/core/login-interstitials/login-interstitials.service.ts b/src/app/core/login-interstitials/login-interstitials.service.ts index 4b1ddfc55..a63d37f44 100644 --- a/src/app/core/login-interstitials/login-interstitials.service.ts +++ b/src/app/core/login-interstitials/login-interstitials.service.ts @@ -27,7 +27,7 @@ export class LoginInterstitialsService { this.interstitialService .getInterstitialsViewed('DOMAIN_INTERSTITIAL') .subscribe((viewed) => { - // this.alreadySawSignDomainInterstitial = viewed + this.alreadySawSignDomainInterstitial = viewed }) this.toggleService .getStateOf('LOGIN_DOMAINS_INTERSTITIAL') @@ -39,38 +39,38 @@ export class LoginInterstitialsService { checkLoginInterstitials(userRecord: UserRecord): Observable | void { if ( userRecord?.userInfo && - userRecord?.emails && + userRecord?.emails?.emailDomains && !this.alreadyCheckLoginInterstitials ) { this.alreadyCheckLoginInterstitials = true - // const isNotImpersonating = - // userRecord.userInfo.REAL_USER_ORCID === - // userRecord.userInfo.EFFECTIVE_USER_ORCID + const isNotImpersonating = + userRecord.userInfo.REAL_USER_ORCID === + userRecord.userInfo.EFFECTIVE_USER_ORCID - // if ( - // isNotImpersonating && - // !this.userHasPublicDomains(userRecord.emails) && - // this.userHasPrivateDomains(userRecord.emails) && - // this.loginDomainsInterstitialEnabled && - // !this.alreadySawSignDomainInterstitial - // ) { - this.alreadySawSignDomainInterstitial = true - this.interstitialService - .setInterstitialsViewed('DOMAIN_INTERSTITIAL') - .subscribe() - const data: ShareEmailsDomainsComponentDialogInput = { - userEmailsJson: userRecord.emails, - } + if ( + isNotImpersonating && + !this.userHasPublicDomains(userRecord.emails) && + this.userHasPrivateDomains(userRecord.emails) && + this.loginDomainsInterstitialEnabled && + !this.alreadySawSignDomainInterstitial + ) { + this.alreadySawSignDomainInterstitial = true + this.interstitialService + .setInterstitialsViewed('DOMAIN_INTERSTITIAL') + .subscribe() + const data: ShareEmailsDomainsComponentDialogInput = { + userEmailsJson: userRecord.emails, + } - const dialog = this._matDialog.open(ShareEmailsDomainsDialogComponent, { - data, - width: '580px', - disableClose: true, - autoFocus: false, - restoreFocus: false, - }) - return dialog.afterClosed() - // } + const dialog = this._matDialog.open(ShareEmailsDomainsDialogComponent, { + data, + width: '580px', + disableClose: true, + autoFocus: false, + restoreFocus: false, + }) + return dialog.afterClosed() + } } } @@ -81,4 +81,4 @@ export class LoginInterstitialsService { userHasPrivateDomains(value: EmailsEndpoint): boolean { return !!value.emailDomains.find((domain) => domain.visibility !== 'PUBLIC') } -} +} \ No newline at end of file From 8a4f7db0ca00e05599cea035e7922303ab253ee5 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 27 Nov 2024 14:18:24 -0600 Subject: [PATCH 3/3] 9499-email-domains-interstitial-registry-sign-in --- src/app/core/login-interstitials/login-interstitials.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/login-interstitials/login-interstitials.service.ts b/src/app/core/login-interstitials/login-interstitials.service.ts index a63d37f44..700664b36 100644 --- a/src/app/core/login-interstitials/login-interstitials.service.ts +++ b/src/app/core/login-interstitials/login-interstitials.service.ts @@ -81,4 +81,4 @@ export class LoginInterstitialsService { userHasPrivateDomains(value: EmailsEndpoint): boolean { return !!value.emailDomains.find((domain) => domain.visibility !== 'PUBLIC') } -} \ No newline at end of file +}