Bug 28157: Add Koha::Patron->can_log_into
authorTomas Cohen Arazi <tomascohen@theke.io>
Tue, 20 Apr 2021 17:21:04 +0000 (14:21 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 22 Apr 2021 12:50:12 +0000 (14:50 +0200)
commit5a8855b789bd9595639cac8e6ed74a3a9cefb5a1
tree7ab03eacb719bd90fed46cb83b07cd671a560cc8
parent49d764e413c58b580e45541626e007d2aa993c7c
Bug 28157: Add Koha::Patron->can_log_into

This patch adds a new method that tells if the patron is allowed to be
logged into certain library.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/auth_authenticate_api_request.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Patron.pm
t/db_dependent/Koha/Patron.t