]> 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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Tue, 11 Jan 2022 21:49:56 +0000 (21:49 +0000)
commiteb358bf48fd50e680c8f1abe93f1528a0acfe7bd
tree91b1346e8afa2e122a50154fb9f5102d9ac6e42b
parenta856a5b88c00898d35897063b7b8ccb2b3ab536d
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: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/REST/Plugin/Objects.pm