Bugzilla – Attachment 44370 Details for
Bug 15124
Allow SIP2 passwordless operation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15124 - Allow SIP2 passwordless operation
Bug-15124---Allow-SIP2-passwordless-operation.patch (text/plain), 4.06 KB, created by
Kyle M Hall
on 2015-11-04 14:00:45 UTC
(
hide
)
Description:
Bug 15124 - Allow SIP2 passwordless operation
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2015-11-04 14:00:45 UTC
Size:
4.06 KB
patch
obsolete
>From b70cde25139e18e00f662eab30d86611a5bb052f Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 4 Nov 2015 08:36:15 -0500 >Subject: [PATCH] Bug 15124 - Allow SIP2 passwordless operation > >Some SIP self check machines allow the use of a "passwordless" mode >where the patron does not need to enter a pin or password to use the SC. >Koha cannot handle this situation. Koha will assume an empty password >field is an invalid password unless the patron's password is NULL in the >database. >--- > C4/SIP/Sip/MsgType.pm | 14 +++++++------- > etc/SIPconfig.xml | 2 +- > 2 files changed, 8 insertions(+), 8 deletions(-) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 24fdc66..6bf806a 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -448,7 +448,7 @@ sub build_patron_status { > $resp .= add_field( FID_VALID_PATRON, 'Y' ); > > # Patron password is a required field. >- $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) ) ); >+ $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) || $server->{account}->{no_password_mode} ) ); > $resp .= maybe_add( FID_CURRENCY, $patron->currency ); > $resp .= maybe_add( FID_FEE_AMT, $patron->fee_amount ); > } >@@ -603,8 +603,7 @@ sub handle_checkout { > > # Password provided, so we can tell if it was valid or not > $resp .= >- add_field( FID_VALID_PATRON_PWD, >- sipbool( $patron->check_password( $fields->{ (FID_PATRON_PWD) } ) ) ); >+ add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password( $fields->{ (FID_PATRON_PWD) } ) || $server->{account}->{no_password_mode} ) ); > } > } > } >@@ -984,8 +983,9 @@ sub handle_patron_info { > $resp .= add_field(FID_VALID_PATRON, 'Y'); > if (defined($patron_pwd)) { > # If patron password was provided, report whether it was right or not. >- $resp .= add_field(FID_VALID_PATRON_PWD, >- sipbool($patron->check_password($patron_pwd))); >+ $resp .= >+ add_field( FID_VALID_PATRON_PWD, >+ sipbool( $patron->check_password($patron_pwd) || $server->{account}->{no_password_mode} ) ); > } > > $resp .= maybe_add(FID_CURRENCY, $patron->currency); >@@ -1244,7 +1244,7 @@ sub handle_patron_enable { > } > else { > # valid patron >- if ( !defined($patron_pwd) || $patron->check_password($patron_pwd) ) { >+ if ( !defined($patron_pwd) || $patron->check_password($patron_pwd) || || $server->{account}->{no_password_mode} ) { > > # Don't enable the patron if there was an invalid password > $status = $patron->enable; >@@ -1255,7 +1255,7 @@ sub handle_patron_enable { > $resp .= add_field( FID_PATRON_ID, $patron->id ); > $resp .= add_field( FID_PERSONAL_NAME, $patron->name ); > if ( defined($patron_pwd) ) { >- $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) ) ); >+ $resp .= add_field( FID_VALID_PATRON_PWD, sipbool( $patron->check_password($patron_pwd) || $server->{account}->{no_password_mode} ) ); > } > $resp .= add_field( FID_VALID_PATRON, 'Y' ); > $resp .= maybe_add( FID_SCREEN_MSG, $patron->screen_msg, $server ); >diff --git a/etc/SIPconfig.xml b/etc/SIPconfig.xml >index 8d2d77b..1712f45 100644 >--- a/etc/SIPconfig.xml >+++ b/etc/SIPconfig.xml >@@ -42,7 +42,7 @@ > <login id="lpl-sc" password="1234" institution="LPL" /> > <login id="lpl-sc-beacock" password="xyzzy" > delimiter="|" error-detect="enabled" institution="LPL" >- send_patron_home_library_in_af="1" > >+ send_patron_home_library_in_af="1" no_password_mode="1"> > <screen_msg_regex find="Greetings from Koha." replace="Welcome to your library!" /> > <screen_msg_regex find="Invalid patron barcode." replace="Barcode not found, are you sure this is your library card?" /> > </login> >-- >1.7.2.5
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 15124
:
44369
| 44370