Skip to content

PM-5489: Allow challenge resources to view Work challenges#2002

Merged
jmgasper merged 1 commit into
devfrom
PM-5489
Jul 1, 2026
Merged

PM-5489: Allow challenge resources to view Work challenges#2002
jmgasper merged 1 commit into
devfrom
PM-5489

Conversation

@jmgasper

@jmgasper jmgasper commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

What was broken
Problem Writers and Problem Testers added directly to a challenge could not open project-scoped Work challenge URLs when they were not also members of the parent project.

Root cause
ChallengeEditorPage blocked the challenge fetch and rendered the project access error based only on project membership, so challenge-level resource roles were never evaluated.

What was changed
Existing challenge routes now fetch the challenge before applying the project fallback. When project access is denied, the page checks the current user's active challenge resource role: full read roles may view the challenge and full write roles may use the edit action. Project/challenge route mismatches still remain denied.

Any added/updated tests
Updated ChallengeEditorPage tests for Problem Tester-style read access, Problem Writer-style write access, and denial when neither project nor challenge resource access is available.

What was broken
Problem Writers and Problem Testers added directly to a challenge could not open project-scoped Work challenge URLs when they were not also members of the parent project.

Root cause
ChallengeEditorPage blocked the challenge fetch and rendered the project access error based only on project membership, so challenge-level resource roles were never evaluated.

What was changed
Existing challenge routes now fetch the challenge before applying the project fallback. When project access is denied, the page checks the current user's active challenge resource role: full read roles may view the challenge and full write roles may use the edit action. Project/challenge route mismatches still remain denied.

Any added/updated tests
Updated ChallengeEditorPage tests for Problem Tester-style read access, Problem Writer-style write access, and denial when neither project nor challenge resource access is available.
@jmgasper jmgasper marked this pull request as ready for review July 1, 2026 22:45
@jmgasper jmgasper requested a review from kkartunov as a code owner July 1, 2026 22:45
@jmgasper jmgasper merged commit b9b1bbd into dev Jul 1, 2026
7 checks passed
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