Bug 18403: Add new methods Koha::Patrons->search_limited and use it where needed
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 6 Apr 2017 15:42:03 +0000 (12:42 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 18:41:39 +0000 (15:41 -0300)
commit7809a6bd132e6bd2c98d69179fc2c2f0788decb0
tree68dc468787748927edad066cca843b52d8829529
parent032992042dc0dcc910465e1ded4b7bbb6d23e9f6
Bug 18403: Add new methods Koha::Patrons->search_limited and use it where needed

Most of the time when we search for patrons we do not want to search for all patrons,
but just the ones the logged in user is allowed to see the information.
This patch takes care of that by adding a new search_limited method to Koha::Patrons.
When called this method only search for patrons that the logged in user is allowed
to see.

Test plan:
Patron autocomplete search should be limited

Signed-off-by: Signed-off-by: Jon McGowan <jon.mcgowan@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patrons.pm
circ/ysearch.pl
members/memberentry.pl
opac/opac-memberentry.pl