This prevents the acq unified_search method from returning anything other
authorJames Fournie <jfournie@sitka.bclibraries.ca>
Tue, 1 Nov 2011 23:01:57 +0000 (16:01 -0700)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 4 Nov 2011 21:03:41 +0000 (17:03 -0400)
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 <jfournie@sitka.bclibraries.ca>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Search.pm

index b6f267c..6e2d854 100644 (file)
@@ -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;