From 4757e6f3771d5e42995053c380e98759f169974d Mon Sep 17 00:00:00 2001 From: James Fournie Date: Tue, 1 Nov 2011 16:01:57 -0700 Subject: [PATCH] This prevents the acq unified_search method from returning anything other than the objects of the expected type. This is to address LP 884991 in which Acq users get a perm error for each result of a search that they don't have access to retrieve. They shouldn't even know about the existence of anything they don't have access to retrieve. Signed-off-by: James Fournie Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm index b6f267c903..6e2d8546ce 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm @@ -462,7 +462,11 @@ q/order_by clause must be of the long form, like: if ($options->{"id_list"}) { $conn->respond($_) foreach @id_list; } else { - $conn->respond($retriever->($e, $_, $options)) foreach @id_list; + foreach(@id_list){ + my $resp = $retriever->($e, $_, $options); + next if(ref($resp) ne "Fieldmapper::acq::$ret_type"); + $conn->respond($resp); + } } $e->disconnect; -- 2.11.0