]> git.koha-community.org Git - koha.git/commit
Bug 29503: Make GET /patrons use Koha::Patrons->search_limited
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 17 Nov 2021 16:07:12 +0000 (13:07 -0300)
committerKyle Hall <kyle@bywatersolutions.com>
Fri, 7 Jan 2022 11:32:38 +0000 (06:32 -0500)
commit7d38b15d65aad783e68957dad43b30d42896f627
treeafcc8520315d8c40f00e2c87f1f29604abe1fcf3
parentbc439a804775ffae0d717a03cf7056bcb39ed2bd
Bug 29503: Make GET /patrons use Koha::Patrons->search_limited

This patch makes the controller method use Koha::Patrons->search_limited
so filters based on configuration and permissions apply when fetching
patrons.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Boo, you get more patrons than you should
3. Apply the patch
4. Repeat 2
=> SUCCESS: Yay! Things are filtered as expected (i.e. using
Koha::Patron->libraries_where_can_see_patrons)
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/REST/V1/Patrons.pm