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

Allow restriction to multiple patron locations. (PP-1648) #2049

Merged
merged 9 commits into from
Sep 17, 2024

Conversation

tdilauro
Copy link
Contributor

@tdilauro tdilauro commented Sep 10, 2024

Description

Support more than a single patron location when restricting which patrons can be associated with a given library.

This PR does this by adding an additional Library Identifier Field, "Patron Location", to the fields that can be used to restrict library membership.

Note:
Setting this PR as draft for now, since I still need to remove the recently added single-valued patron location restriction and add/update some more tests, but would be happy to get an initial review on the approach here.

Motivation and Context

Some libraries have multiple locations, so we need a mechanism to support those.

[Jira PP-1648]

How Has This Been Tested?

Checklist

  • N/A I have updated the documentation accordingly.
  • All new and existing tests passed.

Copy link

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 98.07692% with 1 line in your changes missing coverage. Please review.

Project coverage is 90.79%. Comparing base (fee4a3d) to head (35e6fea).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/palace/manager/api/authentication/basic.py 98.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2049      +/-   ##
==========================================
+ Coverage   90.70%   90.79%   +0.08%     
==========================================
  Files         343      344       +1     
  Lines       40584    40610      +26     
  Branches     6588     8793    +2205     
==========================================
+ Hits        36813    36872      +59     
+ Misses       2501     2484      -17     
+ Partials     1270     1254      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tdilauro tdilauro requested a review from a team September 11, 2024 01:09
Copy link
Member

@jonathangreen jonathangreen left a comment

Choose a reason for hiding this comment

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

The approach here looks good to me!

@tdilauro tdilauro added the feature New feature label Sep 16, 2024
@tdilauro tdilauro force-pushed the feature/multi-location-restriction branch from e66a7f1 to dbc19e7 Compare September 16, 2024 20:07
@tdilauro tdilauro marked this pull request as ready for review September 16, 2024 20:19
@tdilauro
Copy link
Contributor Author

@jonathangreen This could use another look when you have a moment. I'm doing some more manual testing now.

Copy link
Member

@jonathangreen jonathangreen left a comment

Choose a reason for hiding this comment

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

Looks good to me!

src/palace/manager/api/authentication/basic.py Outdated Show resolved Hide resolved
@tdilauro tdilauro merged commit 3069f2e into main Sep 17, 2024
20 checks passed
@tdilauro tdilauro deleted the feature/multi-location-restriction branch September 17, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants