-
Notifications
You must be signed in to change notification settings - Fork 21
Have admin access be priority over resource role on challenge, and fix visibility of checkpoint submissions that fail screening #1311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1502,6 +1502,25 @@ export function useFetchScreeningReview(): useFetchScreeningReviewProps { | |
| reviewEntries: reviewsToRender, | ||
| }) | ||
|
|
||
| const hasCheckpointReview = rowsForSubmission.some(row => Boolean(row.reviewId)) | ||
| const submissionStatus = (item.status ?? '') | ||
| .toString() | ||
| .trim() | ||
| .toUpperCase() | ||
| const failedCheckpointScreening = submissionStatus === 'FAILED_CHECKPOINT_SCREENING' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [💡 |
||
|
|
||
| if (failedCheckpointScreening && !hasCheckpointReview) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| if (debugCheckpointPhases) { | ||
| debugLog('checkpointReview.skipSubmission', { | ||
| reason: 'failedCheckpointScreeningWithoutReview', | ||
| submissionId: item.id, | ||
| submissionStatus, | ||
| }) | ||
| } | ||
|
|
||
| return rows | ||
| } | ||
|
|
||
| rows.push(...rowsForSubmission) | ||
|
|
||
| return rows | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -69,7 +69,10 @@ const useRole = (): useRoleProps => { | |
| return '' | ||
| } | ||
|
|
||
| const normalizedRoles = myRoles.map(role => role.toLowerCase()) | ||
| const normalizedRoles = [ | ||
| ...myRoles.map(role => role.toLowerCase()), | ||
| ...(isTopcoderAdmin ? ['admin'] : []), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [ |
||
| ] | ||
| const rolePriority: ChallengeRole[] = [ | ||
| 'Admin', | ||
| 'Manager', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[⚠️
correctness]The variable
hasCheckpointReviewis determined by checking if anyrowinrowsForSubmissionhas areviewId. Ensure thatrowsForSubmissionis correctly populated with the expected data before this check, as any issues in data population could lead to incorrect logic execution.