-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PIMS-1625: Parcel and Building view details agency authorization #2353
Conversation
🚀 Deployment Information The Express API Image has been built with the tag: |
Code Climate has analyzed commit d1da9cc and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 75.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 95.6%. View more on Code Climate. |
Right now, it seems like this isn't checking if I'm an admin or auditor. I should be able to see properties based on that. |
Good catch! I'll refactor these 2 gets to use that function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working for me.
Prevented me from retrieving details of a parcel that wasn't under my agency.
🎯 Summary
PIMS-1625: - Parcel and Building view details agency authorization
Adding authorization checks to prevent a user from viewing a parcel or a building not belonging to their agency.
To test you can try as a "General user" by editing the url and changing the id of the parcel or building to one that has an agency which doesn't belong to your user's agency.
🔰 Checklist