Bug 22694

Summary: Add a method for checking OpacHiddenItems exceptions in Koha::Patron::Category
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00
Bug Depends on:    
Bug Blocks: 22457, 22696    
Attachments: Bug 22694: Unit tests
Bug 22694: Add Koha::Patron::Category->override_hidden_items
Bug 22694: Unit tests
Bug 22694: Add Koha::Patron::Category->override_hidden_items
Bug 22694: Unit tests
Bug 22694: Add Koha::Patron::Category->override_hidden_items

Description Tomás Cohen Arazi 2019-04-12 13:07:34 UTC
In order to better organize the code for checking visibility confingurations in many opac-*.pl controller scripts this method will be introduced.

At the end of the path, it will be replaced by a table column on bug 22457.
Comment 1 Tomás Cohen Arazi 2019-04-12 13:45:10 UTC
Created attachment 87908 [details] [review]
Bug 22694: Unit tests
Comment 2 Tomás Cohen Arazi 2019-04-12 13:45:17 UTC
Created attachment 87909 [details] [review]
Bug 22694: Add Koha::Patron::Category->override_hidden_items

This patch introduces a method to determine for a given category if
patrons belonging to it override OpacHiddenItems policies.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patron/Category.t
=> SUCCESS: Tests pass!
- Sign off :-D
Comment 3 Martin Renvoize 2019-04-23 14:43:05 UTC
Created attachment 88509 [details] [review]
Bug 22694: Unit tests

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2019-04-23 14:43:07 UTC
Created attachment 88510 [details] [review]
Bug 22694: Add Koha::Patron::Category->override_hidden_items

This patch introduces a method to determine for a given category if
patrons belonging to it override OpacHiddenItems policies.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patron/Category.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2019-04-23 14:43:27 UTC
Simple to test, works as expected and makes sense.

Signing Off
Comment 6 Martin Renvoize 2019-04-23 14:50:30 UTC
Created attachment 88513 [details] [review]
Bug 22694: Unit tests

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2019-04-23 14:50:32 UTC
Created attachment 88514 [details] [review]
Bug 22694: Add Koha::Patron::Category->override_hidden_items

This patch introduces a method to determine for a given category if
patrons belonging to it override OpacHiddenItems policies.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/Koha/Patron/Category.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Bin Wen <bin.wen@inlibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2019-04-23 14:51:35 UTC
Switching my SO to a PQA and grabbing an SO from Bin Wen as he must have tested this as part of SO on bug 22696.
Comment 9 Nick Clemens 2019-04-24 11:43:27 UTC
Awesome work all!

Pushed to master for 19.05
Comment 10 Martin Renvoize 2019-04-26 14:57:54 UTC
Enhancement will not be backported to 18.11.x series.