From: James Fournie Date: Tue, 1 Nov 2011 23:01:57 +0000 (-0700) Subject: This prevents the acq unified_search method from returning anything other X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=25c2dbe0ad7b9f642181dd504d58e87790ad6a8f;p=evergreen%2Fpines.git 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 --- 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;