Bugzilla – Attachment 173598 Details for
Bug 31224
Koha::Biblio::Metadata->record should use the EmbedItems filter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31224: Adapt GET /public/biblios/:biblio_id controller
Bug-31224-Adapt-GET-publicbibliosbiblioid-controll.patch (text/plain), 2.41 KB, created by
Tomás Cohen Arazi (tcohen)
on 2024-10-29 00:02:03 UTC
(
hide
)
Description:
Bug 31224: Adapt GET /public/biblios/:biblio_id controller
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2024-10-29 00:02:03 UTC
Size:
2.41 KB
patch
obsolete
>From 40eae6d72b9007c56bc348be18d909791a1cc9e8 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 28 Oct 2024 16:42:08 -0300 >Subject: [PATCH] Bug 31224: Adapt GET /public/biblios/:biblio_id controller > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Biblios.pm | 24 +++++------------------- > 1 file changed, 5 insertions(+), 19 deletions(-) > >diff --git a/Koha/REST/V1/Biblios.pm b/Koha/REST/V1/Biblios.pm >index ae4d5d1c26c..035d215c52f 100644 >--- a/Koha/REST/V1/Biblios.pm >+++ b/Koha/REST/V1/Biblios.pm >@@ -22,7 +22,6 @@ use Mojo::Base 'Mojolicious::Controller'; > use Koha::Biblios; > use Koha::DateUtils; > use Koha::Ratings; >-use Koha::RecordProcessor; > use C4::Biblio qw( DelBiblio AddBiblio ModBiblio ); > use C4::Search qw( FindDuplicate ); > >@@ -162,32 +161,19 @@ sub get_public { > > return try { > >- my $metadata = $biblio->metadata; >- my $record = $metadata->record; >- >- my $opachiddenitems_rules = C4::Context->yaml_preference('OpacHiddenItems'); >+ my $schema = $biblio->metadata->schema // C4::Context->preference("marcflavour"); > my $patron = $c->stash('koha.user'); > >- # Check if the biblio should be hidden for unprivileged access >- # unless there's a logged in user, and there's an exception for it's >- # category >+ # Check if the bibliographic record should be hidden for unprivileged access >+ # unless there's a logged in user, and there's an exception for it's category >+ my $opachiddenitems_rules = C4::Context->yaml_preference('OpacHiddenItems'); > unless ( $patron and $patron->category->override_hidden_items ) { > if ( $biblio->hidden_in_opac( { rules => $opachiddenitems_rules } ) ) { > return $c->render_resource_not_found("Bibliographic record"); > } > } > >- my $schema = $metadata->schema // C4::Context->preference("marcflavour"); >- >- my $record_processor = Koha::RecordProcessor->new({ >- filters => 'ViewPolicy', >- options => { >- interface => 'opac', >- frameworkcode => $biblio->frameworkcode >- } >- }); >- # Apply framework's filtering to MARC::Record object >- $record_processor->process($record); >+ my $record = $biblio->metadata_record( { interface => 'opac', patron => $patron } ); > > $c->respond_to( > marcxml => { >-- >2.47.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 31224
:
138060
|
138061
|
138062
|
138063
|
138064
|
142137
|
142138
|
142139
|
142140
|
142141
|
142142
|
142143
|
161933
|
161934
|
161935
|
161936
|
161937
|
161938
|
161939
|
161940
|
161941
|
161942
|
161943
|
161944
|
173530
|
173531
|
173532
|
173533
|
173534
|
173535
|
173588
|
173597
|
173598
|
173636
|
173637
|
173638
|
173639
|
173640
|
173641
|
173642
|
173643
|
173644
|
174262
|
174263