]> git.koha-community.org Git - koha.git/commit
Bug 29506: Make objects.search call search_limited if present
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 17 Nov 2021 17:30:21 +0000 (14:30 -0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 6 Jan 2022 00:03:28 +0000 (14:03 -1000)
commit13fba03080af3389217ca0c152a08521e0b9cd42
tree8199e1ed4191fe2c2baced31accb3a046db6d49f
parent91123608b25cc9413eda768c812c051376cbd23f
Bug 29506: Make objects.search call search_limited if present

This patch makes objects.search implicitly update the passed
*$result_set* to use search_limited. This way no object leaks could
happen without noticing.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/REST/Plugin/Objects.t
=> FAIL: Tests fail because search_limited is not used
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! Results are correctly filtered based on userenv!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/REST/Plugin/Objects.pm