Bugzilla – Attachment 120798 Details for
Bug 27600
SIP2: renew_all shouldn't perform a password check
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27600: Remove password check from `cancel_hold`
Bug-27600-Remove-password-check-from-cancelhold.patch (text/plain), 2.10 KB, created by
Martin Renvoize (ashimema)
on 2021-05-10 15:34:43 UTC
(
hide
)
Description:
Bug 27600: Remove password check from `cancel_hold`
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-05-10 15:34:43 UTC
Size:
2.10 KB
patch
obsolete
>From 9aca89f67f8c4ce9691eef8cf7736eae2e74c550 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 10 May 2021 16:09:17 +0100 >Subject: [PATCH] Bug 27600: Remove password check from `cancel_hold` > >As suggested in the bugzilla comments, the cancel_hold method also >doesn't require the password checking code. > >Test plan >1/ Run t/db_dependent/SIP/ILS.t and watch it pass >--- > C4/SIP/ILS.pm | 3 --- > t/db_dependent/SIP/ILS.t | 7 ++++--- > 2 files changed, 4 insertions(+), 6 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index a80052e033..fdc493e708 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -347,9 +347,6 @@ sub cancel_hold { > if (!$patron) { > $trans->screen_msg("Invalid patron barcode."); > return $trans; >- } elsif (defined($patron_pwd) && !$patron->check_password($patron_pwd)) { >- $trans->screen_msg('Invalid patron password.'); >- return $trans; > } > > unless ($item = C4::SIP::ILS::Item->new($item_id || $title_id)) { >diff --git a/t/db_dependent/SIP/ILS.t b/t/db_dependent/SIP/ILS.t >index f39fb28b11..0ca810d599 100755 >--- a/t/db_dependent/SIP/ILS.t >+++ b/t/db_dependent/SIP/ILS.t >@@ -72,7 +72,7 @@ is( $ils->test_cardnumber_compare( 'A1234', 'b1234' ), > q{}, 'borrower bc test identifies difference' ); > > subtest cancel_hold => sub { >- plan tests => 5; >+ plan tests => 6; > > my $library = $builder->build_object ({ class => 'Koha::Libraries' }); > my $patron = $builder->build_object( >@@ -117,8 +117,9 @@ subtest cancel_hold => sub { > > my $ils = C4::SIP::ILS->new({ id => $library->branchcode }); > my $sip_patron = C4::SIP::ILS::Patron->new( $patron->cardnumber ); >- my $transaction = $ils->cancel_hold($patron->cardnumber,undef,$item->barcode,undef); >- >+ my $transaction = $ils->cancel_hold($patron->cardnumber,"",$item->barcode,undef); >+ >+ isnt( $transaction->{screen_msg}, 'Invalid patron password.', "Empty password succeeds" ); > is( $transaction->{screen_msg},"Hold Cancelled.","We get a success message when hold cancelled"); > > is( $item->biblio->holds->count(), 0, "Bib has 0 holds remaining"); >-- >2.20.1
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 27600
:
116243
|
116245
|
116246
|
120266
|
120267
|
120796
|
120797
|
120798
|
120799
|
120829
|
120830