Repository navigation
Aditya Dhayapulay - Require explicit Community Portal login access - #5789
Open
adit24dhaya wants to merge 2 commits into
Open
adit24dhaya wants to merge 2 commits into
adit24dhaya wants to merge 2 commits into
Conversation
Close the secondary-login gate when access data is missing, display denied-account and retry messages, and use the HTTP status instead of its optional text. Covers findings from the Phase 3 access audit.
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
adit24dhaya
marked this pull request as ready for review
November 6, 2026 05:21
Clear the fallback redirect on unmount so it cannot navigate after the form closes or leak into the next session. A controlled-clock regression fails on the previous commit and passes with cleanup.
|
This branch has not been deployed
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.



Description
The Community Portal gate showed protected UI when a main token had no access object. The login form silently ignored denied-account and server/network errors. Require explicit secondary access and show clear denial/retry feedback.
Original task request
HGN Phase III: Social Architecture — Deliverable 0, page 6. Original requirements: check that the person is active in Main and require secondary login with current credentials. Found during Aditya's assigned Phase 3 general-functionality E2E testing task; this does not complete the entire 60-hour assignment.
Related PRS (if any):
Backend: OneCommunityGlobal/HGNRest#2475. Test both branches together; merge backend first.
Main changes explained:
canAccessBMPortal === true; missing/false/non-boolean access returns to secondary login.How to test:
npx vitest run src/components/CommunityPortal/Login/__tests__/CPLogin.test.jsx src/components/common/CPDashboard/CPProtectedRoute/CPProtectedRoute.test.jsx src/utils/__tests__/authInit.test.js src/actions/__tests__/authActions.js.test.js.Validation: 35 frontend tests, 16 Chromium cases at 390/1280px, production build, JS lint and commit hooks pass. The before-fix browser run reproduced missing-access and inactive-account entry; all four failing cases now pass. The paired real-controller/disposable-MongoDB checks also pass all seven API cases.
Screenshots or videos of changes:
Note:
The harness uses actual auth startup/actions/reducer, portal login/gate and logout, plus the real secondary controller and disposable MongoDB. Main-token issuance and protected destination content are fixture-only. This validates the login/logout slice, not all role permissions or full deployed E2E. No shared writes, real notifications or manual deployments. Week 6 media is prepared locally, not uploaded to Dropbox.