LP#
1533329: Selectively disallow opt-in based on patron's home library
Patrons from Library A can "opt in" to sharing their personal
information with Library B. However, hitherto there has been no way for
Library A to prevent their patrons from being opted in at other
libraries. This would be useful if, for example, Library A is a school
library and does not want other libraries in the consortium to have
access to student accounts.
This commit adds the ability to selectively disallow opt-in by home
library. Specifically, it makes the following changes:
1. Adds an org setting (org.restrict_opt_to_depth) that governs opt-in
restrictions. All org units within the home OU's section of the org
tree at or below depth X are within the patron's opt-in scope; opt-in is
disallowed at any library outside of that scope. If the setting is not
enabled, the entire org tree is effectively within scope. (None of this
should be confused with the opt boundary, which defines the point at
which patrons need to be opted in vs. just granting access without
opt-in.)
2. Modifies open-ils.actor.user.org_unit_opt_in.check so that it checks
that setting and determines if the current work OU is within the
patron's opt-in scope. If opt-in is not permitted at this work OU,
an appropriate response is returned.
3. Handles the response in both staff clients. If opt-in is disallowed,
staff will see an alert which says, "This patron's record is not
viewable at your library."
Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>