Skip to content

Commit 00a8aac

Browse files
committed
Have admin access be priority over resource role on challenge, and fix visibility of checkpoint submissions that fail screening
1 parent 1359f92 commit 00a8aac

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/apps/review/src/lib/hooks/useFetchScreeningReview.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,6 +1502,25 @@ export function useFetchScreeningReview(): useFetchScreeningReviewProps {
15021502
reviewEntries: reviewsToRender,
15031503
})
15041504

1505+
const hasCheckpointReview = rowsForSubmission.some(row => Boolean(row.reviewId))
1506+
const submissionStatus = (item.status ?? '')
1507+
.toString()
1508+
.trim()
1509+
.toUpperCase()
1510+
const failedCheckpointScreening = submissionStatus === 'FAILED_CHECKPOINT_SCREENING'
1511+
1512+
if (failedCheckpointScreening && !hasCheckpointReview) {
1513+
if (debugCheckpointPhases) {
1514+
debugLog('checkpointReview.skipSubmission', {
1515+
reason: 'failedCheckpointScreeningWithoutReview',
1516+
submissionId: item.id,
1517+
submissionStatus,
1518+
})
1519+
}
1520+
1521+
return rows
1522+
}
1523+
15051524
rows.push(...rowsForSubmission)
15061525

15071526
return rows

src/apps/review/src/lib/hooks/useRole.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ const useRole = (): useRoleProps => {
6969
return ''
7070
}
7171

72-
const normalizedRoles = myRoles.map(role => role.toLowerCase())
72+
const normalizedRoles = [
73+
...myRoles.map(role => role.toLowerCase()),
74+
...(isTopcoderAdmin ? ['admin'] : []),
75+
]
7376
const rolePriority: ChallengeRole[] = [
7477
'Admin',
7578
'Manager',

0 commit comments

Comments
 (0)