allow users to see their own payments w/o perm
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Feb 2011 14:35:05 +0000 (14:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 18 Feb 2011 14:35:05 +0000 (14:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@19479 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm

index d472820..38aff42 100644 (file)
@@ -534,9 +534,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;
     }