Skip to content

Commit 144ddb2

Browse files
authored
Add ready for indexing check (#1989)
* Add ready for indexing check * Backend checks on disallow robots conditons
1 parent b1c5aa8 commit 144ddb2

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/app/record/pages/my-orcid/my-orcid.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
5858
initMyOrcidParameter = false
5959

6060
regionActivities = $localize`:@@shared.activities:Activities`
61+
readyForIndexing: boolean
6162

6263
constructor(
6364
_userInfoService: UserInfoService,
@@ -121,6 +122,9 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
121122
this.userInfo = userRecord?.userInfo
122123
this.checkLoadingState(userRecord)
123124
this.recordWithIssues = userRecord?.userInfo?.RECORD_WITH_ISSUES
125+
this.readyForIndexing =
126+
userRecord?.userInfo?.READY_FOR_INDEXING === 'true'
127+
124128
this.userNotFound = userRecord?.userInfo?.USER_NOT_FOUND
125129
this.userRecord = userRecord
126130

@@ -129,10 +133,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
129133
this.observeSessionUpdates()
130134
}
131135

132-
if (
133-
this.publicOrcid &&
134-
(this.recordWithIssues || this.userNotFound)
135-
) {
136+
if (this.publicOrcid && !this.readyForIndexing) {
136137
this._robotsMeta.disallowRobots()
137138
}
138139
this._openGraph.addOpenGraphData(userRecord, { force: true })

src/app/types/userInfo.endpoint.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ export interface UserInfo {
1717
RECORD_WITH_ISSUES: boolean
1818
USER_NOT_FOUND: boolean
1919
DELEGATED_BY_ADMIN: 'true' | undefined
20+
READY_FOR_INDEXING: string
2021
}

0 commit comments

Comments
 (0)