Bugzilla – Attachment 153502 Details for
Bug 30979
Add ability for OPAC users to checkout to themselves
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30979: Fix regression
Bug-30979-Fix-regression.patch (text/plain), 1.45 KB, created by
Tomás Cohen Arazi
on 2023-07-14 19:33:40 UTC
(
hide
)
Description:
Bug 30979: Fix regression
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2023-07-14 19:33:40 UTC
Size:
1.45 KB
patch
obsolete
>From d0ef15717f0d6ea0b9e0406e865631d17e1f585a Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 14 Jul 2023 10:20:27 -0300 >Subject: [PATCH] Bug 30979: Fix regression > >This patch fixes a regression introduced by the 'Fix public availability >500' follow-up. > >To test: >1. Run: > $ ktd --shell > k$ prove t/db_dependent/api/v1/checkouts.t >=> FAIL: Tests fail! >2. Apply this patch >3. Repeat 1 >=> SUCCESS: Tests pass! Tests are useful! >4. Sign off :-D > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Checkouts.pm | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/Koha/REST/V1/Checkouts.pm b/Koha/REST/V1/Checkouts.pm >index 1571c227b6f..f6b69055e81 100644 >--- a/Koha/REST/V1/Checkouts.pm >+++ b/Koha/REST/V1/Checkouts.pm >@@ -160,9 +160,12 @@ sub get_availability { > my ( $impossible, $confirmation, $warnings ) = > $c->_check_availability( $patron, $item ); > >- my $confirm_keys = join( ":", sort keys %{$confirmation} ); >- $confirm_keys = $user ? $user->id : '' . ":" . $item->id . ":" . $confirm_keys; >- my $token = Koha::Token->new->generate_jwt( { id => $confirm_keys } ); >+ my @confirm_keys = sort keys %{$confirmation}; >+ unshift @confirm_keys, $item->id; >+ unshift @confirm_keys, $user->id >+ if $user; >+ >+ my $token = Koha::Token->new->generate_jwt( { id => join( ':', @confirm_keys ) } ); > > my $response = { > blockers => $impossible, >-- >2.41.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 30979
:
139131
|
139132
|
139133
|
139134
|
141274
|
141275
|
141276
|
141277
|
141278
|
141279
|
141300
|
145264
|
145265
|
145266
|
145267
|
145268
|
145277
|
145280
|
145281
|
145282
|
145283
|
145284
|
145285
|
145620
|
145621
|
145622
|
145623
|
145624
|
145625
|
145626
|
145627
|
145628
|
145629
|
145630
|
150867
|
150868
|
150869
|
150870
|
150871
|
150872
|
150873
|
150874
|
150875
|
150876
|
150877
|
150878
|
150879
|
150880
|
150881
|
150882
|
150883
|
150884
|
150885
|
150886
|
150887
|
150888
|
150889
|
150967
|
150968
|
150969
|
150970
|
150971
|
150972
|
150973
|
150974
|
151254
|
151255
|
151256
|
151257
|
151258
|
151259
|
151260
|
151261
|
151358
|
151359
|
151360
|
151361
|
151362
|
151363
|
151364
|
151365
|
151368
|
151369
|
151370
|
151371
|
151372
|
151373
|
151374
|
151375
|
151376
|
152789
|
152790
|
152791
|
152792
|
152793
|
152794
|
152795
|
152796
|
152797
|
153459
|
153460
|
153461
|
153462
|
153463
|
153464
|
153465
|
153466
|
153467
|
153500
|
153501
| 153502 |
153503