Skip to content

Hotfix for PM-4281#1547

Merged
jmgasper merged 1 commit intomasterfrom
PM-4281-hotfix
Mar 20, 2026
Merged

Hotfix for PM-4281#1547
jmgasper merged 1 commit intomasterfrom
PM-4281-hotfix

Conversation

@jmgasper
Copy link
Collaborator

@jmgasper jmgasper commented Mar 20, 2026

Fix broken submission visibility logic

https://topcoder.atlassian.net/browse/PM-4281


Open with Devin

@jmgasper jmgasper requested a review from kkartunov as a code owner March 20, 2026 05:36
@jmgasper jmgasper merged commit 113bed3 into master Mar 20, 2026
1 of 5 checks passed
)
const isRestricted = isRestrictedBase || failedScan || !cannotDownloadSubmission
const isOwnSubmission = String(submission.memberId) === String(loginUserInfo?.userId)
const canDownloadSubmission = canDownloadSubmissionFromSubmissionsTab({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 readability]
The isOwnSubmission variable is used to determine if the submission belongs to the current user. Consider using a more descriptive name like isUserSubmission to improve clarity.

const isRestricted = isRestrictedBase || failedScan || !cannotDownloadSubmission
const isOwnSubmission = String(submission.memberId) === String(loginUserInfo?.userId)
const canDownloadSubmission = canDownloadSubmissionFromSubmissionsTab({
canViewSubmissions,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ maintainability]
The function canDownloadSubmissionFromSubmissionsTab is used to determine download permissions. Ensure that this function handles all necessary permission checks, especially if new roles or conditions are added in the future.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant