allow users to see their own payments w/o perm
authorBill Erickson <berick@esilibrary.com>
Wed, 9 Feb 2011 18:13:22 +0000 (13:13 -0500)
committerBill Erickson <berick@esilibrary.com>
Wed, 9 Feb 2011 18:13:22 +0000 (13:13 -0500)
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm

index 66de1ab..3da2634 100644 (file)
@@ -532,9 +532,11 @@ sub format_payment_receipt {
                     mbt => ['usr']
                 }
             }
-        ]) or return OpenILS::Event->new('MP_NOT_FOUND');
+        ]) or return $e->event;
 
-        return $e->event unless $e->allowed('VIEW_TRANSACTION', $payment->xact->usr->home_ou); 
+        return $e->event unless 
+            $e->requestor->id == $payment->xact->usr->id or
+            $e->allowed('VIEW_TRANSACTION', $payment->xact->usr->home_ou); 
 
         push @$payments, $payment;
     }