Bug 14385: Extend OpacHiddenItems to allow specifying exempt borrower categories
authorChris Cormack <chrisc@catalyst.net.nz>
Wed, 5 Nov 2014 21:34:18 +0000 (10:34 +1300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 2 Nov 2018 10:33:09 +0000 (10:33 +0000)
commit5e4e10c4ca558180137bf5a4ff5a68495efa0ec7
tree72e65a8b391fa54ae45b762ae5e0ba36e08129c7
parent12ed04eabb32cb957acd9f88d94ccada0ac09d07
Bug 14385: Extend OpacHiddenItems to allow specifying exempt borrower categories

Edit: Fixing merge conflicts in
 - t/db_dependent/Items.t
 - t/db_dependent/Search.t
 - C4/Search.pm

Changes the API for calling GetHiddenItems and all the places in the code that call it. This is to allow borrower categories to be passed in.
Adds an OpacHiddenItemsExceptions syspref to allow certain borrower categories to be able to see items, even if they are marked hidden by OpacHiddenItems

To test:

1) Make two borrowers, one in a category that should see everything (ie Adult), and another in a category that should only see certain things (ie Adult - exceptions)
2) Add the borrower that can see everything (the Adult) to OpacHiddenItemsExceptions
3) To the OpacHiddenItems syspref, add an item type (ensure that you have some records that fall under this type in your library).
4) Log in as the borrower that should only see certain things (Adult - exception)
5) Do a search, filtered to show records which are the item type that you specified in the OpacHiddenItems syspref. No records should show for this borrower as this item type is hidden to them.
6) Log in as the borrower that should see everything (Adult)
7) Do the same search. There should be results from this search, as this borrower category has been specified as an exception to the hidden items

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Items.pm
C4/Search.pm
catalogue/search.pl
cataloguing/addbooks.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
opac/opac-ISBDdetail.pl
opac/opac-MARCdetail.pl
opac/opac-detail.pl
opac/opac-search.pl
t/db_dependent/Items.t
t/db_dependent/Search.t