Skip to content

Commit

Permalink
Merge branch 'main' into lmendoza/9453-update-node-version
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesw authored Nov 12, 2024
2 parents 369a7be + 6387cb8 commit 7933af1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v2.107.8 - 2024-11-11

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.7...v2.107.8)

- [#2391](https://github.com/ORCID/orcid-angular/pull/2391): 9489-qa-email-domains-interstitial-shown-to-user-with-at-least-one-pu…

## v2.107.7 - 2024-11-08

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.6...v2.107.7)
Expand Down
6 changes: 6 additions & 0 deletions src/app/authorize/pages/authorize/authorize.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class AuthorizeComponent {
domainInterstitialHasBeenViewed: boolean
userIsNotImpersonating: boolean
insidePopUpWindows: boolean
userHasPublicDomains: boolean

constructor(
_user: UserService,
Expand Down Expand Up @@ -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')
Expand All @@ -90,6 +95,7 @@ export class AuthorizeComponent {
if (
url &&
this.userHasPrivateDomains &&
!this.userHasPublicDomains &&
this.oauthDomainsInterstitialEnabled &&
!this.domainInterstitialHasBeenViewed &&
this.userIsNotImpersonating &&
Expand Down

0 comments on commit 7933af1

Please sign in to comment.