From: erickson Date: Wed, 9 Dec 2009 21:32:19 +0000 (+0000) Subject: added extra filter optoins for retrieving user payment history X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3e9a2918d1c4426bd1d2efd31231788a85a4768a;p=evergreen%2Fmasslnc.git added extra filter optoins for retrieving user payment history git-svn-id: svn://svn.open-ils.org/ILS/trunk@15129 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm index 191dccfed6..39b4e7eaaf 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Actor.pm @@ -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;