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-1525 Active status check backend #2354

Merged
merged 4 commits into from
Apr 29, 2024
Merged

Conversation

dbarkowsky
Copy link
Collaborator

🎯 Summary

PIMS-1525

Changes

  • Inserted middleware function on routes that checks if the requesting user has an Active status

Tried to determine which routes this was needed on, but feel free to make suggestions if you see something out of place.

🔰 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: 2354. 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.

@@ -15,13 +16,13 @@ const router = express.Router();
// Endpoints for Admin Agencies
router
.route(`/`)
.get(protectedRoute(), catchErrors(getAgencies))
.post(protectedRoute([Roles.ADMIN]), catchErrors(addAgency));
.get(protectedRoute(), activeUserCheck, catchErrors(getAgencies))
Copy link
Contributor

Choose a reason for hiding this comment

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

This probably should not have it, since we need to enumerate the agencies on the access request page before the keycloak user gets a row in the user table.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I thought that came from the lookup routes. Will change.

Copy link

codeclimate bot commented Apr 29, 2024

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

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

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

View more on Code Climate.

@dbarkowsky dbarkowsky merged commit b9405dc into main Apr 29, 2024
7 checks passed
@dbarkowsky dbarkowsky deleted the PIMS-1525-Active-Check-Backend branch April 29, 2024 21:36
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