Skip to content

Commit

Permalink
Merge pull request #1708 from ORCID/UserEffectiveUserOrcidToStoreCont…
Browse files Browse the repository at this point in the history
…ributors

User effective user orcid to store contributors
  • Loading branch information
leomendoza123 authored Jul 28, 2022
2 parents 4bef229 + 36bf7f5 commit 7f2dfc0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function getContributor(): Contributor[] {
function getUserRecord(): UserRecord {
return {
userInfo: {
REAL_USER_ORCID: '0000-0000-0000-000X',
EFFECTIVE_USER_ORCID: '0000-0000-0000-000X',
},
} as UserRecord
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ export class WorkContributorRolesComponent implements OnInit {
private getRecordHolderContribution(): Contributor {
return this.contributors?.find(
(c) =>
c?.contributorOrcid?.path === this.userRecord?.userInfo?.REAL_USER_ORCID
c?.contributorOrcid?.path ===
this.userRecord?.userInfo?.EFFECTIVE_USER_ORCID
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ export class WorkContributorsComponent implements OnInit, OnDestroy {
}

ngOnInit(): void {
this.id = this.userRecord?.userInfo?.REAL_USER_ORCID
// EFFECTIVE_USER_ORCID keeps the ORCID id of the user you are on.
// REAL_USER_ORCID will contain the orcid id of a delegator when on delegation mode.
this.id = this.userRecord?.userInfo?.EFFECTIVE_USER_ORCID
this.platform
.get()
.pipe(takeUntil(this.$destroy))
Expand Down

0 comments on commit 7f2dfc0

Please sign in to comment.