Bug 30048 - Koha::ArticleRequests->search_limited may be malformed.
Summary: Koha::ArticleRequests->search_limited may be malformed.
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-08 15:31 UTC by Martin Renvoize
Modified: 2022-02-08 15:37 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-08 15:31:45 UTC
Whilst digging through Koha::Suggestions with bug 29886 it highlighted to me that our 'search_limited' method differs somewhat between different Koha classes.

My initial understanding, from Koha::Patrons->search_limited, was that the idea of search_limited was to protect patron data across branches.  In actual fact, it's more about restricting the object class in questions data from being leaked across branches. 

As such, I think the construction used in ArticleRequests is incorrect. Instead of limiting based on the requesting patrons attached to the requests the currently logged in patron can see.. we should be limiting simply by which libraries the current patron is allowed to see... and the linked patron details should be getting obfuscated in their own right.