Bug 30019

Summary: We should DRY out search_limited (and rename it)
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, julian.maurice, kyle, tomascohen
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29888
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29886
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18403
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30048
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29523
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:

Description Martin Renvoize 2022-02-03 16:53:39 UTC
We've started adding a few search_limited methods to Koha::PluralClass objects to limit searches to only return patron related rows the current logged in user should be allowed to see.

We should a) rename search_limited to search_with_patron_limits (to match search_with_library_limits that already exists)
and b) DRY out the code along the lines of Koha::Objects::Limit::Library.
Comment 1 Martin Renvoize 2022-06-29 13:31:20 UTC
Should these actually be..


* filter_by_library_limits
* filter_by_patron_limits

and

* filter_by_accessible (combining both the above)