Bugzilla – Attachment 48670 Details for
Bug 13871
OverDrive message when user authentication fails
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13871: [QA Follow-up] Adjust Patron Status Request
Bug-13871-QA-Follow-up-Adjust-Patron-Status-Reques.patch (text/plain), 3.40 KB, created by
Marcel de Rooy
on 2016-03-04 10:17:01 UTC
(
hide
)
Description:
Bug 13871: [QA Follow-up] Adjust Patron Status Request
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-03-04 10:17:01 UTC
Size:
3.40 KB
patch
obsolete
>From f55fb79dace72b772d8bd3d1eba8edb84e75a1cd Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Sat, 27 Feb 2016 14:26:51 +0100 >Subject: [PATCH] Bug 13871: [QA Follow-up] Adjust Patron Status Request >Content-Type: text/plain; charset=utf-8 > >Conform QA comment on Bugzilla, we do this: > >[1] Attribute for overdrive mode/invalid credentials is not really needed. > We can always pass a screen message that card or password is invalid. >[2] If the cardnumber is correct and the password is wrong, we should > still honour the request. The bad password is recognized by BLN and > an additional message in AF. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Verified by telnetting SIP server. >And tested additionally with the new unit test of bug 15956. >--- > C4/SIP/Sip/MsgType.pm | 29 ++++++++++++----------------- > 1 file changed, 12 insertions(+), 17 deletions(-) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 451f228..65faef3 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -23,6 +23,9 @@ use UNIVERSAL::can; > > use vars qw(@ISA $VERSION @EXPORT_OK); > >+use constant INVALID_CARD => 'Invalid cardnumber'; >+use constant INVALID_PW => 'Invalid password'; >+ > BEGIN { > $VERSION = 3.07.00.049; > @ISA = qw(Exporter); >@@ -406,26 +409,16 @@ sub handle { > # > sub build_patron_status { > my ( $patron, $lang, $fields, $server ) = @_; >- my $overdrive_mode = $server->{account}->{'overdrive-mode'}; >+ > my $patron_pwd = $fields->{ (FID_PATRON_PWD) }; > my $resp = (PATRON_STATUS_RESP); >- my $password_ok = 1; > my $password_rc; > >- if ($patron) { >+ if ( $patron ) { > if ($patron_pwd) { > $password_rc = $patron->check_password($patron_pwd); >- $password_ok = 0 unless $password_rc; > } >- elsif ( $overdrive_mode >- and not exists $fields->{'AL'} # not block_request >- and not $patron_pwd ) # no password supplied >- { >- $password_ok = 0; >- } >- } > >- if ( $patron and $password_ok ) { > $resp .= patron_status_string($patron); > $resp .= $lang . timestamp(); > $resp .= add_field( FID_PERSONAL_NAME, $patron->name ); >@@ -443,13 +436,16 @@ sub build_patron_status { > $resp .= maybe_add( FID_FEE_AMT, $patron->fee_amount ); > } > >- $resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg, $server ); >+ my $msg = $patron->screen_msg; >+ $msg .= ' -- '. INVALID_PW if $patron_pwd && !$password_rc; >+ $resp .= maybe_add( FID_SCREEN_MSG, $msg, $server ); >+ > $resp .= maybe_add( FID_SCREEN_MSG, $patron->{branchcode}, $server ) > if ( $server->{account}->{send_patron_home_library_in_af} ); > $resp .= maybe_add( FID_PRINT_LINE, $patron->print_line ); >- } else { > >- # Invalid patron id (and/or passwd for overdrive_mode) >+ } else { >+ # Invalid patron (cardnumber) > # Report that the user has no privs. > > # no personal name, and is invalid (if we're using 2.00) >@@ -463,8 +459,7 @@ sub build_patron_status { > ( $protocol_version >= 2 ) > and $resp .= add_field( FID_VALID_PATRON, 'N' ); > >- $resp .= >- maybe_add( FID_SCREEN_MSG, 'Invalid patron or patron password' ); >+ $resp .= maybe_add( FID_SCREEN_MSG, INVALID_CARD ); > } > > $resp .= add_field( FID_INST_ID, $fields->{ (FID_INST_ID) } ); >-- >1.7.10.4
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 13871
:
37539
|
37543
|
38451
|
38452
|
38453
|
38454
|
38455
|
45645
|
45646
|
45647
|
45648
|
45649
|
48386
|
48387
|
48388
|
48389
|
48390
|
48391
|
48392
|
48393
|
48667
|
48668
|
48669
| 48670 |
48671
|
48672
|
51421
|
51422