Hide OPAC-invisible holdings from SRU/Z39.50 user/dbs/sru_hide_opac_invisible_2_2
authorDan Scott <dscott@laurentian.ca>
Mon, 16 Jul 2012 17:27:54 +0000 (13:27 -0400)
committerDan Scott <dscott@laurentian.ca>
Tue, 17 Jul 2012 17:18:14 +0000 (13:18 -0400)
commit256041c9001b980bfa7b20ed29dc0cd0a8c09e65
treef432f106cc4849da10255f4fe60044ecc124200b
parent256f4c8039d2105cd978e22af1353b46be0c0cd1
Hide OPAC-invisible holdings from SRU/Z39.50

The basic_holdings Supercat method filtered out deleted call numbers and
copies, but didn't filter out copies based on the OPAC visibility status
of copy location / status / the copy itself. This has undesired results
when third-party services request copies via SRU or Z39.50 and expose
copies that should not be visible to the public.

We wrap all of the visibility and deletedness checks for a given copy up
into a subroutine so that we can avoid repeating ourselves in the
basic_holdings logic. Also, if we missed a test, we can add it in one
handy place :)

(Thanks to Galen Charlton for finding two missing tests: circ lib
visibility and owning lib visibility!)

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm