Skip to content

Commit

Permalink
Merge pull request #1150 from ORCID/add-protocol-to-orcid-base-url-
Browse files Browse the repository at this point in the history
add protocol to orcid base url
  • Loading branch information
bobcaprice authored Apr 4, 2024
2 parents d6f90e7 + 3171476 commit 4437428
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ui/src/app/affiliation/affiliations.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ <h1 id="page-heading" class="mt-3" i18n="@@gatewayApp.assertionServiceAssertion.
<td>{{ affiliation.email }}</td>
<td>
<span *ngIf="affiliation.orcidId"
><a href="https://{{ orcidBaseUrl }}/{{ affiliation.orcidId }}" target="_blank"
>https://{{ orcidBaseUrl }}/{{ affiliation.orcidId }}</a
><a href="{{ orcidBaseUrl }}/{{ affiliation.orcidId }}" target="_blank"
>{{ orcidBaseUrl }}/{{ affiliation.orcidId }}</a
></span
>
</td>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/app.constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function emailValidator(control: FormControl): { [key: string]: any } | n
return null
}
const environment = window.location.hostname.replace('member-portal.', '').replace('.orcid.org', '')
export const ORCID_BASE_URL = environment + '.orcid.org'
export const ORCID_BASE_URL = 'https://' + environment + '.orcid.org'

// eslint-disable-next-line
export const EMAIL_REGEXP = /^([^@\s]|(".+"))+@([^@\s\."'\(\)\[\]\{\}\\/,:;]+\.)+([^@\s\."'\(\)\[\]\{\}\\/,:;]{2,})+$/
Expand Down
6 changes: 3 additions & 3 deletions ui/src/app/landing-page/landing-page.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('LandingPageComponent', () => {
component.processRequest('someState', '', '')
expect(landingPageService.getOrcidConnectionRecord).toHaveBeenCalled()
expect(component.oauthUrl).toBe(
'localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState'
'https://localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState'
)
expect(landingPageService.getPublicKey).toHaveBeenCalledTimes(0)
expect(windowLocationService.updateWindowLocation).toHaveBeenCalled()
Expand All @@ -72,7 +72,7 @@ describe('LandingPageComponent', () => {
component.processRequest('someState', '', '')
expect(landingPageService.getOrcidConnectionRecord).toHaveBeenCalled()
expect(component.oauthUrl).toBe(
'localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState'
'https://localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState'
)
expect(landingPageService.getPublicKey).toHaveBeenCalledTimes(0)
expect(windowLocationService.updateWindowLocation).toHaveBeenCalledTimes(0)
Expand All @@ -92,7 +92,7 @@ describe('LandingPageComponent', () => {
component.processRequest('someState', '', '')
expect(landingPageService.getOrcidConnectionRecord).toHaveBeenCalled()
expect(component.oauthUrl).toBe(
'localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState'
'https://localhost.orcid.org/oauth/authorize?response_type=token&redirect_uri=/landing-page&client_id=name&scope=/read-limited /activities/update /person/update openid&prompt=login&state=someState'
)
expect(landingPageService.getPublicKey).toHaveBeenCalledTimes(0)
expect(windowLocationService.updateWindowLocation).toHaveBeenCalledTimes(0)
Expand Down

0 comments on commit 4437428

Please sign in to comment.