Skip to content
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-1805: Disposal project property search constraints #2486

Merged
merged 6 commits into from
Jul 2, 2024
Merged

Conversation

LawrenceLau2020
Copy link
Collaborator

@LawrenceLau2020 LawrenceLau2020 commented Jun 27, 2024

🎯 Summary

PIMS-1805:

Changes

  • Adding restrictions on property search in projects so that "General Users" should only be able to add their own agency's properties, while administrators can add a property from any agency to a project.

  • Only properties that are in "Surplus Active" or "Surplus Encumbered" classification can be added.

I needed to change the propertiesFuzzySearch, so hoping this doesn't break anything.

Testing

  • To test, you'll need to change your user's role to a "General User", then search for a property and confirm that you can only see properties belonging to your agency and if you belong to a parent agency, that properties belonging to the sub agency also can be added.
  • These properties should all have a classification of either "Surplus Active" or "Surplus Encumbered".

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

Copy link

🚀 Deployment Information

The Express API Image has been built with the tag: 2486. Please make sure to utilize this specific tag when promoting these changes to the TEST and PROD environments during the API deployment. For more updates please monitor Image Tags Page on Wiki.

Copy link

codeclimate bot commented Jun 27, 2024

Code Climate has analyzed commit 07b9724 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 80.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 93.2%.

View more on Code Climate.

Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is working well for me. As a general user, only properties from my agencies appear in the fuzzy search list.

@dbarkowsky dbarkowsky merged commit 6562d20 into main Jul 2, 2024
9 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-1805 branch July 2, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants