Repository navigation
Sireesha - Add permanent HGN questionnaire link with access restrictions - #5702
kunchalasireesha wants to merge 3 commits into
Conversation
Add /questionnaire as a permanent, shareable link to the HGN questionnaire. The link and all questionnaire pages only open for users invited through the Dropbox process. Admins can copy the link from Access Management and the Community Members dashboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Only an invite into the Highest Good Network Team Dropbox folder now unlocks the HGN Questionnaire. Invites into the Administration Team folder do not. - Explain on the questionnaire page when the user's Dropbox invite is for a different team folder (NOT_HGN_TEAM_FOLDER) - Access Management: show "Copy questionnaire link" only for HGN folder invites, hint under the folder picker whether it activates the questionnaire, and confirm with a toast after an HGN invite - Add data-testid to app cards and tests for the Access Management modal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ssb1506
left a comment
There was a problem hiding this comment.
How I verified
Tested the PR #5702 frontend changes locally. Reviewed the questionnaire access gate implementation and tested the Community Members page, Access Management modal, and non-invited user access restriction.
Verified working
- Community Members page displays the Copy questionnaire link button.
- Clicking the button successfully copies the questionnaire link and displays a success notification.
- Access Management modal displays Dropbox access status and invitation controls.
- Non-invited users see the questionnaire access restriction message on
/questionnaire.
Issues found
1. Dropbox invitation fails with HTTP 400.
- Attempted to invite a volunteer through the Access Management modal.
- The request returned
Dropbox API error: Response failed with a 400 code. - The invitation was unsuccessful, and the user's Dropbox status remained
No Access.
2. Potential stale authorization status due to caching.
QuestionnaireAccessGate.jsxstores eligible user IDs in a module-levelSet.- Subsequent access checks are skipped for users already present in the cache.
- If Dropbox access is revoked after a user has been marked eligible, the cached status could prevent a fresh access check.
Additional verification
- Non-invited user restriction on
/questionnaire: Verified working. - Login redirect: Tested; encountered an unexpected redirect to
/dashboard/questionnairewith a 404. - Invited-user questionnaire access and submission: Blocked by the invitation failure.
iAbhi001
left a comment
There was a problem hiding this comment.
Tested locally at commit 79ee96a alongside backend PR #2428 as an Admin and Volunteer. The newly added test suites pass cleanly. The "Copy questionnaire link" button functions properly on both /hgnhelp/community and the Access Management modal. Uninvited users are cleanly intercepted by QuestionnaireAccessGate across /questionnaire and direct page routes (/hgnform/page1-page6), and dark mode renders with proper contrast. Approving.
|
|
Thanks for testing! |



Description
Implements: HGN Questionnaire Dashboard – Create a Permanent Questionnaire Link with Access Restrictions.
Adds a permanent, reusable questionnaire link,

https://highestgood.com/questionnaire, that administrators can share with every eligible person. The link becomes active for a person once they have been set up and invited through the HGN Dropbox process. Anyone else sees a message explaining that the questionnaire isn't available to them yet. People who aren't logged in are sent to login, then back to the questionnaire.Related PRS (if any):
This frontend PR is related to the OneCommunityGlobal/HGNRest#2428 backend PR.
…
Main changes explained:
src/components/HGNForm/access/QuestionnaireAccessGate.jsx: checksGET /api/hgnform/accessand only shows the questionnaire to eligible users. Otherwise it shows a message for each case: not invited, Dropbox access revoked, account inactive, or the check failed. Supports dark mode.src/components/HGNForm/access/questionnaireLink.js: the permanent link path (/questionnaire) in one place.src/components/HGNForm/access/CopyQuestionnaireLinkButton.jsx: a "Copy questionnaire link" button for admins.src/routes.jsx: add the/questionnaireroute (redirects eligible users to/hgnform/page1), and protect/hgnform/page1throughpage6with the same check so the pages can't be opened directly.AccessManagementModal.jsx: show "Copy questionnaire link" on the Dropbox row once the user has been invited.CommunityMembersPage.jsx(HGN Help dashboard): add the "Copy questionnaire link" button.FollowupQuestions.jsx: show an error toast when a submission is refused (403) instead of failing silently.src/utils/URL.js: addHGN_FORM_ACCESS.QuestionnaireAccessGate.test.jsx,CopyQuestionnaireLinkButton.test.jsx.How to test:
Check out this branch and the backend PR branch.
2. Run
npm installandnpm run start:localto run this PR locally.3. Clear site data/cache.
4. Log in as an admin. Open a volunteer's profile → Access Management. Confirm "Copy questionnaire link" only appears on the Dropbox row after the Dropbox invite is sent. Click it and check that
<site>/questionnairewas copied.5. Go to HGN Help → Community Members (
/hgnhelp/community) and confirm the copy button is there.6. Log in as the invited volunteer and open
/questionnaire→ it redirects to the questionnaire's first page. Complete and submit the form.7. Log in as a volunteer who was not invited and open
/questionnaireand/hgnform/page3→ both show the "not available" message.8. Revoke the volunteer's Dropbox access →
/questionnairenow shows the "access revoked" message.9. Log out and open
/questionnaire→ after login you land back on the questionnaire.10. Verify the message page and buttons in dark mode.
Screenshots or videos of changes:
Screen.Recording.2026-10-24.at.12.33.34.PM.mov
Screen.Recording.2026-10-24.at.12.40.22.PM.mov
revoke.step.mp4
Note:
Requires the backend PR (
GET /api/hgnform/access) to be merged/deployed first.https://highestgood.com/questionnaire. Steps are in the backend PR'sdocs/HGN_QUESTIONNAIRE_LINK.md.