Bug 30019 - We should DRY out search_limited (and rename it)
Summary: We should DRY out search_limited (and rename it)
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement with 4 votes (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-03 16:53 UTC by Martin Renvoize
Modified: 2022-06-29 13:31 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)