fix: add role guard to user officer proposals table#1523
Merged
Conversation
YufanKambang
previously approved these changes
May 20, 2026
simonfernandes
approved these changes
May 20, 2026
Contributor
|
The client side for the code can still be affected. Not sure if this is needed but making sure that the at the API layer that supplies data to This exists here: it is defended |
YufanKambang
approved these changes
May 20, 2026
Contributor
Author
Yeap, the backend already prevented unauthorised users from accessing the data so this PR just stops them from navigating to the page. |
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.
Closes UserOfficeProject/issue-tracker/issues/990
Description
Currently, unauthorized roles could access the
ProposalTableOfficercomponent by navigating to the/Proposalsroute manually. This change makes it such only theUser OfficerandProposal Readerroles are allowed to access it. Any unauthorized roles attempting to access the/Proposalsroute directly will be redirected back to the main dashboard (/)Motivation and Context
How Has This Been Tested
Fixes
Changes
Frontend AppRoutes.tsx:
isUserOfficer||isProposalReader)/Proposalsthat redirects unauthorized roles back to/Depends on
Tests included/Docs Updated?