Bosu fix: correct HGN help access restrictions frontend - #5449
Open
BosuBose132 wants to merge 1 commit into
Open
Bosu fix: correct HGN help access restrictions frontend#5449BosuBose132 wants to merge 1 commit into
BosuBose132 wants to merge 1 commit into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
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
Fixes the HGN Questionnaire Dashboard access restriction issue on
/hgnhelp.Previously, valid users could still be blocked from submitting HGN Help requests because access eligibility was determined using incomplete client-side role/team logic. The questionnaire submission flow could also navigate to the success page before confirming that the questionnaire response was successfully saved.
This update moves HGN Help eligibility to the backend as the authoritative source, properly handles eligibility loading/error states, and ensures questionnaire submission completes successfully before navigating to the confirmation page.
Fixes: (PRIORITY URGENT) HGN Questionnaire Dashboard - Fix Access Restriction Too Strict on
/hgnhelpRelated PRS (if any):
Main changes explained:
HelpModal.jsxto retrieve HGN Help eligibility from the backend instead of relying on client-side role and team checks.userIdfrom help request and eligibility calls so user identity is determined securely by the backend from authentication.FollowupQuestions.jsxto wait for a successful server response before navigating to the confirmation page.How to test:
Checkout the frontend branch:
Bosu-fix-hgnhelp-access-restrictionCheckout backend PR #BACKEND_PR_NUMBER and run both applications locally.
Run the frontend:
nvm use 20npm installnpm run start:localLog in with an Owner/Admin/Core Team/Software Development Team test account.
Navigate to
/hgnhelpbefore completing the HGN questionnaire and verify:Navigate to
/hgnform, complete the questionnaire, and submit it.Verify the questionnaire request returns HTTP
201before navigating to the success page.Return to
/hgnhelpand verify:true.questionnaireCompletedreturnstrue.Select a help category and submit the request.
Verify
/api/helprequest/createreturns HTTP201and the success notification is displayed.Verify the request payload does not contain a client-provided
userId.Verify the Suggestions link and existing Suggestions submission functionality still work.
Verify the functionality in both light and dark mode.
Screenshots or videos of changes:
Note:
This frontend PR requires the related backend PR for the complete eligibility and authentication flow. The backend is now responsible for determining the authenticated user's eligibility.