[Bug 38936] New: Move suppressed record redirection into a sub
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Bug ID: 38936 Summary: Move suppressed record redirection into a sub Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Bug 28478 solved a long standing issue, but there's room for improvement: the controllers use a fairly big code block to handle redirection for suppressed records, with checks for things like `OpacSuppressionByIPRange`. This should be put into a sub. Probably `C4::Output::opac_suppression_redirect` -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28478 CC| |tomascohen@gmail.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Status|NEW |ASSIGNED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Product|Koha security |Koha Group|Koha security | Component|Koha |Architecture, internals, | |and plumbing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #10 from Jonathan Druart <jonathan.druart@gmail.com> --- I am ready to QA this as soon as it's signed off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Jesse Maseto <jesse@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jesse@bywatersolutions.com Status|Needs Signoff |Patch doesn't apply --- Comment #11 from Jesse Maseto <jesse@bywatersolutions.com> --- Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176855|0 |1 is obsolete| | Attachment #176856|0 |1 is obsolete| | Attachment #176857|0 |1 is obsolete| | --- Comment #12 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185249 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185249&action=edit Bug 38936: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #13 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185250 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185250&action=edit Bug 38936: Introduce C4::Output::redirect_if_opac_suppressed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #14 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185251 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185251&action=edit Bug 38936: Use redirect_if_opac_suppressed() in opac-*detail.pl pages Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178576|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178577|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178578|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|jonathan.druart@gmail.com |testopia@bugs.koha-communit | |y.org --- Comment #15 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Rebased. Also: * Removed Jonathan from QA as he's on vacation. * Removed the 24.05.x patches. Can regenerate if required later. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |david@davidnind.com --- Comment #16 from David Nind <david@davidnind.com> --- The patch no longer applies: git bz apply 28478 Bug 28478 - MARC detail and ISBD pages still show suppressed records 176898 - Bug 28478: Add get_opac_suppression extractor 176899 - Bug 28478: Add Koha::Biblio->opac_suppressed() 176900 - Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 28478: Add get_opac_suppression extractor Using index info to reconstruct a base tree... M Koha/Biblio/Metadata/Extractor/MARC.pm M t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t Falling back to patching base and 3-way merge... Auto-merging t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t CONFLICT (content): Merge conflict in t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t error: Failed to merge in the changes. Patch failed at 0001 Bug 28478: Add get_opac_suppression extractor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #17 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- They apply cleanly to me <.<: ``` ❯ git bz apply 38936 Bug 38936 - Move suppressed record redirection into a sub 185249 - Bug 38936: Unit tests 185250 - Bug 38936: Introduce C4::Output::redirect_if_opac_suppressed 185251 - Bug 38936: Use redirect_if_opac_suppressed() in opac-*detail.pl pages Apply? [(y)es, (n)o, (i)nteractive] y Aplicando: Bug 38936: Unit tests Aplicando: Bug 38936: Introduce C4::Output::redirect_if_opac_suppressed Aplicando: Bug 38936: Use redirect_if_opac_suppressed() in opac-*detail.pl pages ``` Resubmitting just in case my git version is using newer tricks to solve the apply. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185249|0 |1 is obsolete| | Attachment #185250|0 |1 is obsolete| | Attachment #185251|0 |1 is obsolete| | --- Comment #18 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185937&action=edit Bug 38936: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #19 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185938&action=edit Bug 38936: Introduce C4::Output::redirect_if_opac_suppressed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #20 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 185939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185939&action=edit Bug 38936: Use redirect_if_opac_suppressed() in opac-*detail.pl pages Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #21 from David Nind <david@davidnind.com> --- I guess it would help if I applied the correct bug! 8-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185937|0 |1 is obsolete| | --- Comment #22 from David Nind <david@davidnind.com> --- Created attachment 185967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185967&action=edit Bug 38936: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185938|0 |1 is obsolete| | --- Comment #23 from David Nind <david@davidnind.com> --- Created attachment 185968 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185968&action=edit Bug 38936: Introduce C4::Output::redirect_if_opac_suppressed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185939|0 |1 is obsolete| | --- Comment #24 from David Nind <david@davidnind.com> --- Created attachment 185969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185969&action=edit Bug 38936: Use redirect_if_opac_suppressed() in opac-*detail.pl pages Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #25 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. The new tests should pass after the patch is applied: 1.1 prove t/db_dependent/Output.t 2. The other tests in bug 28478 should also continue to pass: 2.1 prove t/db_dependent/Koha/Biblio/Metadata/Extractor/MARC.t 2.2 prove t/db_dependent/Koha/Biblio.t 3. OPAC suppression works as expected: 3.1 Set OpacSuppression system preference to "Hide". 3.2 Edit a record (I used Programming Perl, 262) and changed 942$n to "Yes". 3.3 Attempt to access the record in the OPAC and you should get "Record blocked You are not authorized to view this record.". 3.4 Checked for all OPAC views: - Normal view: /cgi-bin/koha/opac-detail.pl?biblionumber=262 - MARC view: /cgi-bin/koha/opac-MARCdetail.pl?biblionumber=262 - ISBD view: /cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=262 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185967|0 |1 is obsolete| | --- Comment #26 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186767&action=edit Bug 38936: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185968|0 |1 is obsolete| | --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186768 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186768&action=edit Bug 38936: Introduce C4::Output::redirect_if_opac_suppressed Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185969|0 |1 is obsolete| | --- Comment #28 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 186769 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186769&action=edit Bug 38936: Use redirect_if_opac_suppressed() in opac-*detail.pl pages Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #29 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186780 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186780&action=edit Bug 38936: Remove local WARN We now have Test::NoWarnings -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #30 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #31 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- We ended up with another http link in the license of Output.t causing xt/find-license-problems.t to fail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #32 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 187139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187139&action=edit Bug 38936: Use https in license -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 --- Comment #33 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Follow up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Laura.escamilla@bywatersolu | |tions.com Status|Pushed to main |Needs documenting --- Comment #34 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- This is an enhancement and will not be backported to the 25.05.x branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38936 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #35 from David Nind <david@davidnind.com> --- No changes required to the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org