Conversation
What was broken Anonymous users opening a group-protected challenge details URL could land on the existing not-found/access-denied state instead of being sent through login first. Root cause (if identifiable) The challenge details load treats anonymous group-access failures as a generic failed challenge load, and the UI did not redirect anonymous users when a challenge payload or access error showed group protection. What was changed Added challenge-detail helpers to detect grouped challenge payloads and anonymous group-access failures, then redirect anonymous users to Topcoder login while preserving the original challenge URL. Authenticated users still follow the existing group membership access check. Any added/updated tests Added challenge-detail tests for grouped challenge detection, anonymous access-error detection, and login URL return-path preservation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
Anonymous users opening a group-protected challenge details URL could land on the existing not-found/access-denied state instead of being sent through login first.
Root cause (if identifiable)
The challenge details load treats anonymous group-access failures as a generic failed challenge load, and the UI did not redirect anonymous users when a challenge payload or access error showed group protection.
What was changed
Added challenge-detail helpers to detect grouped challenge payloads and anonymous group-access failures, then redirect anonymous users to Topcoder login while preserving the original challenge URL. Authenticated users still follow the existing group membership access check.
Any added/updated tests
Added challenge-detail tests for grouped challenge detection, anonymous access-error detection, and login URL return-path preservation.
Validation run
npm run jest -- tests/shared/containers/challenge-detail/index.jsx
npm lint (not supported by npm 6; followed with npm run lint)
npm run lint
npm test
npm run build