added extra filter optoins for retrieving user payment history
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Dec 2009 21:32:19 +0000 (21:32 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 9 Dec 2009 21:32:19 +0000 (21:32 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15129 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm

index 191dccf..39b4e7e 100644 (file)
@@ -3633,6 +3633,13 @@ sub user_payments {
         $query->{$_} = $filters->{$_} if defined $filters->{$_};
     }
 
+    if(defined $filters->{where}) {
+        foreach (keys %{$filters->{where}}) {
+            # don't allow the caller to expand the result set to other users
+            $query->{where}->{$_} = $filters->{where}->{$_} unless $_ eq 'xact'; 
+        }
+    }
+
     my $payment_ids = $e->json_query($query);
     $conn->respond($e->retrieve_money_payment($_->{id})) for @$payment_ids;