-
Notifications
You must be signed in to change notification settings - Fork 21
hotfix(PM-3208): add manager comment button showing to submitters and normal reviewer #1380
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 |
|---|---|---|
|
|
@@ -226,7 +226,7 @@ workflows: | |
| branches: | ||
| only: | ||
| - dev | ||
| - pm-3141_3 | ||
| - pm-3141_fix | ||
|
|
||
| - deployQa: | ||
| context: org-global | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -319,10 +319,11 @@ export const TableAppealsResponse: FC<TableAppealsResponseProps> = (props: Table | |
| const scoreVisibilityConfig = useMemo<ScoreVisibilityConfig>( | ||
| () => ({ | ||
| canDisplayScores: () => true, | ||
| canRespondToAppeals, | ||
| canViewScorecard: true, | ||
| isAppealsTab: false, | ||
| }), | ||
| [], | ||
| [canRespondToAppeals], | ||
|
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 columns = useMemo<TableColumn<SubmissionRow>[]>(() => { | ||
|
|
@@ -467,7 +468,7 @@ export const TableAppealsResponse: FC<TableAppealsResponseProps> = (props: Table | |
| > | ||
| <Link | ||
| className={styles.respondButton} | ||
| to={getReviewRoute(submission.id, reviewId)} | ||
| to={getReviewRoute(submission.id, reviewId, canRespondToAppeals)} | ||
|
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. [❗❗ |
||
| > | ||
| Respond to Appeals | ||
| </Link> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -522,6 +522,7 @@ export function renderScoreCell( | |
| canViewScorecard, | ||
| viewOwnScorecardTooltip = VIEW_OWN_SCORECARD_TOOLTIP, | ||
| getReviewUrl, | ||
| canRespondToAppeals, | ||
| }: ScoreVisibilityConfig = configWithDefaults | ||
|
|
||
| const reviewDetail = submission.aggregated?.reviews?.[reviewIndex] | ||
|
|
@@ -585,7 +586,9 @@ export function renderScoreCell( | |
| ) | ||
| } | ||
|
|
||
| const reviewUrl = getReviewUrl ? getReviewUrl(reviewId) : getReviewRoute(submission.id, reviewId) | ||
| const reviewUrl = getReviewUrl | ||
| ? getReviewUrl(reviewId) | ||
| : getReviewRoute(submission.id, reviewId, canRespondToAppeals) | ||
|
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. [❗❗ |
||
|
|
||
| return ( | ||
| <div className={styles.scoreReopenBlock}> | ||
|
|
@@ -615,6 +618,7 @@ export function renderAppealsCell( | |
| canViewScorecard, | ||
| viewOwnScorecardTooltip = VIEW_OWN_SCORECARD_TOOLTIP, | ||
| getReviewUrl, | ||
| canRespondToAppeals, | ||
| }: ScoreVisibilityConfig = configWithDefaults | ||
|
|
||
| const reviewDetail = submission.aggregated?.reviews?.[reviewIndex] | ||
|
|
@@ -668,7 +672,9 @@ export function renderAppealsCell( | |
| ) | ||
| } | ||
|
|
||
| const reviewUrl = getReviewUrl ? getReviewUrl(reviewId) : getReviewRoute(submission.id, reviewId) | ||
| const reviewUrl = getReviewUrl | ||
| ? getReviewUrl(reviewId) | ||
| : getReviewRoute(submission.id, reviewId, canRespondToAppeals) | ||
|
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. [❗❗ |
||
|
|
||
| return ( | ||
| <Link | ||
|
|
||
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.
[⚠️
security]The condition
isAdmin || hasReviewerRoleis used to determinecanRespondToAppeals. Ensure that this logic aligns with the intended access control policy, as it might inadvertently allow more users than intended to respond to appeals.