Require login and Wipro All membership for Topgear - #2427
Merged
Merged
Conversation
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.
Topgear previously rendered its Opportunities listing for anonymous visitors. All routes on the Topgear host now require a logged-in profile and an authenticated Groups API response confirming membership in Wipro - All before the route tree mounts.
Anonymous users are sent to login with their full return URL, including query parameters and fragments. Non-members see an access-restricted page; pending checks and errors never render or fetch challenge content. Checks are canceled when obsolete and repeated when the member or path changes. This also covers direct challenge details and other routes on the Topgear hostname. Other hosts retain their normal access behavior.
The access group defaults to
b7f7c0f8-8ee8-409e-9e5c-33404983b635(verified as Wipro - All), withREACT_APP_TOPGEAR_ACCESS_GROUP_IDseparate from the challenge listing filter. Membership comes from/v6/groups/memberGroups/:memberId?uuid=true, including active parent memberships; email suffixes and cookie presence do not grant access. Existing Challenge API authorization remains in place.Validation: 35 focused tests cover anonymous login, pending checks, members/non-members, failures and retry, obsolete requests, profile changes, malformed API responses, direct routes, and existing Opportunities routing. Companion avatar-menu links: topcoder-platform/universal-navigation#417.
Full
yarn lintandLOGICAL_ENV=dev yarn run buildpass. The dev build is published and its served HTML matches the local build; the CloudFront invalidation completed. Live anonymous and invalid-session browser checks reach login with the complete return URL and issue zero challenge requests. Browser checks against the deployed app with controlled profile/membership responses confirm member access, non-member denial, API-error denial, direct-detail denial, and normal behavior on the non-Topgear host. A valid dev member session was unavailable (the supplied production token is rejected by dev); positive membership was checked using fixtures, and the production Groups API independently confirmed the Wipro group ID and token owner’s membership. The existing/challengesHTTP 302 still preserves repeated query parameters.