ACQ Fund retrieval API permission improvements
authorBill Erickson <berick@esilibrary.com>
Thu, 22 Mar 2012 20:07:34 +0000 (16:07 -0400)
committerBill Erickson <berick@esilibrary.com>
Thu, 29 Mar 2012 14:10:32 +0000 (10:10 -0400)
Allow users with ADMIN_ACQ_FUND (in addition to the deprecated
ADMIN_FUND) permission to retrieve fund year information via
open-ils.acq.fund.org[.years].retrieve

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Acq/Financials.pm

index acdcd31..57eb88c 100644 (file)
@@ -305,7 +305,7 @@ sub retrieve_org_funds {
 
     my $limit_perm = ($$options{limit_perm}) ? $$options{limit_perm} : 'ADMIN_FUND';
     return OpenILS::Event->new('BAD_PARAMS') 
-        unless $limit_perm =~ /(ADMIN|MANAGE|VIEW)_FUND/;
+        unless $limit_perm =~ /(ADMIN|MANAGE|VIEW)_(ACQ_)?FUND/;
 
     $filter->{org}  = $filter->{org} || 
         $U->user_has_work_perm_at($e, $limit_perm, {descendants =>1});