Bug 29890

Summary: Unprivileged route to bib records needs check on OpacSuppression
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: REST APIAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P5 - low CC: dcook, fridolin.somers, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20846
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17921
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 24909    
Bug Blocks:    

Description Katrin Fischer 2022-01-15 13:14:12 UTC
Filed because of David's comment on bug 24909:

The unprivileged route for bibliographic records needs to take OpacSuppression into account.
Comment 1 David Cook 2022-01-17 02:08:57 UTC
Thanks, Katrin. I'm a bit overwhelmed by all the different places that need to take into account things like OpacSuppression and OpacHideItems...
Comment 2 Fridolin Somers 2022-01-18 06:42:56 UTC
For OpacHideItems, create a new report depending on Bug 24403 omnibus
Comment 3 Fridolin Somers 2022-01-18 06:44:20 UTC
I hope our open-source ILS is mainly used for 100% open-data ;)
Comment 4 David Cook 2022-01-19 01:12:07 UTC
(In reply to Fridolin Somers from comment #3)
> I hope our open-source ILS is mainly used for 100% open-data ;)

Hahahaha
Comment 5 David Cook 2022-01-19 01:15:47 UTC
(In reply to Fridolin Somers from comment #2)
> For OpacHideItems, create a new report depending on Bug 24403 omnibus

I don't think I have a report at the moment.

I think Tomas has made progress on creating functions to handle OpacHideItems via the Koha::Biblio object, so that's good. OpacSuppression really needs an equivalent. (I think there might also be some performance limitations to the OpacHideItems calculation, but I'm probably not going to work on them...and I'd need to do some profiling to even prove that those limitations exist...)
Comment 6 Tomás Cohen Arazi 2022-01-19 03:18:11 UTC
(In reply to Fridolin Somers from comment #2)
> For OpacHideItems, create a new report depending on Bug 24403 omnibus

https://git.koha-community.org/Koha-community/Koha/src/branch/master/Koha/REST/V1/Biblios.pm#L178
Comment 7 David Cook 2022-01-19 03:58:54 UTC
(In reply to Tomás Cohen Arazi from comment #6)
> (In reply to Fridolin Somers from comment #2)
> > For OpacHideItems, create a new report depending on Bug 24403 omnibus
> 
> https://git.koha-community.org/Koha-community/Koha/src/branch/master/Koha/
> REST/V1/Biblios.pm#L178

I've been thinking we could just extend "hidden_in_opac" to include OpacSuppression as well. That might be a better name for this bug report really...
Comment 8 David Cook 2022-01-19 04:00:52 UTC
I have wondered a bit about OpacSuppressionByIPRange with an API although I don't know how much that is used. We don't have stats on it on Hea due to the private nature of the values I think...