Bugzilla – Attachment 89830 Details for
Bug 22925
AuthenticatePatron should fail if patron has lost card
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22925 : Disable ILS-DI AuthenticatePatron if patron has lost card.
Bug-22925--Disable-ILS-DI-AuthenticatePatron-if-pa.patch (text/plain), 1.32 KB, created by
Arthur Suzuki
on 2019-05-16 12:47:32 UTC
(
hide
)
Description:
Bug 22925 : Disable ILS-DI AuthenticatePatron if patron has lost card.
Filename:
MIME Type:
Creator:
Arthur Suzuki
Created:
2019-05-16 12:47:32 UTC
Size:
1.32 KB
patch
obsolete
>From f35528e2e3030a97a86f8359a629bf38f1e2f641 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Thu, 16 May 2019 14:43:37 +0200 >Subject: [PATCH] Bug 22925 : Disable ILS-DI AuthenticatePatron if patron has > lost card. > >test plan: >1 / set a patron as card lost in the intranet >2 / query ILS-DI with login and password -> should respond with >borrowernumber >3 / apply patch >4 / Repeat 2, should respond code "PatronLostCard" >--- > C4/ILSDI/Services.pm | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > >diff --git a/C4/ILSDI/Services.pm b/C4/ILSDI/Services.pm >index 43935bbf8f..ef2a157d20 100644 >--- a/C4/ILSDI/Services.pm >+++ b/C4/ILSDI/Services.pm >@@ -369,14 +369,16 @@ sub AuthenticatePatron { > my $username = $cgi->param('username'); > my $password = $cgi->param('password'); > my ($status, $cardnumber, $userid) = C4::Auth::checkpw( C4::Context->dbh, $username, $password ); >- if ( $status ) { >+ if ( $status ) > # Get the borrower > my $patron = Koha::Patrons->find( { userid => $userid } ); >- return { id => $patron->borrowernumber }; >- } >- else { >+ else > return { code => 'PatronNotFound' }; >- } >+ >+ if ( $patron->lost ) >+ return { code => 'PatronLostCard' }; >+ >+ return { id => $patron->borrowernumber }; > } > > =head2 GetPatronInfo >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22925
: 89830