Bugzilla – Attachment 181438 Details for
Bug 39600
Use the API to render the OPAC ILL requests table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39600: Implement public_read_lists for ILL::Request and ::Attribute
Bug-39600-Implement-publicreadlists-for-ILLRequest.patch (text/plain), 2.02 KB, created by
Tomás Cohen Arazi (tcohen)
on 2025-04-24 13:11:35 UTC
(
hide
)
Description:
Bug 39600: Implement public_read_lists for ILL::Request and ::Attribute
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2025-04-24 13:11:35 UTC
Size:
2.02 KB
patch
obsolete
>From ce038ff067c0a77b25f9f84176bd38f32a7dbdba Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Tadeusz=20=E2=80=9Etadzik=E2=80=9D=20So=C5=9Bnierz?= > <tadeusz@sosnierz.com> >Date: Thu, 10 Apr 2025 11:41:09 +0200 >Subject: [PATCH] Bug 39600: Implement public_read_lists for ILL::Request and > ::Attribute > >Sponsored-by: Wiko (https://www.wiko-berlin.de/) >Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/ILL/Request.pm | 12 ++++++++++++ > Koha/ILL/Request/Attribute.pm | 4 ++++ > Koha/REST/V1/ILL/Requests.pm | 1 + > 3 files changed, 17 insertions(+) > >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index c57400cb03f..804f597e88c 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -2090,6 +2090,18 @@ sub TO_JSON { > return $object; > } > >+=head3 public_read_list >+ >+This method returns the list of publicly readable database fields for both API and UI output purposes >+ >+=cut >+ >+sub public_read_list { >+ return [qw( >+ illrequest_id backend status extended_attributes placed updated >+ )]; >+} >+ > =head2 Internal methods > > =head3 to_api_mapping >diff --git a/Koha/ILL/Request/Attribute.pm b/Koha/ILL/Request/Attribute.pm >index a761ab8c623..3f1bc4e8c87 100644 >--- a/Koha/ILL/Request/Attribute.pm >+++ b/Koha/ILL/Request/Attribute.pm >@@ -58,6 +58,10 @@ sub request { > return Koha::ILL::Request->_new_from_dbic( $self->_result->illrequest ); > } > >+sub public_read_list { >+ return [qw(backend illrequest_id readonly type value)]; >+} >+ > =head2 Internal methods > > =head3 _type >diff --git a/Koha/REST/V1/ILL/Requests.pm b/Koha/REST/V1/ILL/Requests.pm >index 6291f7a3581..55c4e59d6fd 100644 >--- a/Koha/REST/V1/ILL/Requests.pm >+++ b/Koha/REST/V1/ILL/Requests.pm >@@ -61,6 +61,7 @@ sub list { > sub patron_list { > my $c = shift->openapi->valid_input or return; > my $user = $c->stash('koha.user'); >+ $c->stash(is_public => 1); > > if ($user->borrowernumber != $c->param('patron_id') and !$user->is_superlibrarian) { > return $c->render( >-- >2.49.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 39600
:
180758
|
180759
|
180760
|
180761
|
180762
|
180763
|
180764
|
180778
|
180781
|
180785
|
180786
|
180787
|
180821
|
181132
|
181133
|
181134
|
181135
|
181437
|
181438
|
181439
|
181440
|
181441
|
181442
|
181443
|
181524
|
181525
|
181526
|
181532
|
181533
|
181534
|
181535
|
181536
|
181537
|
181538
|
181608
|
181652