From 6a9da252600b15e53770ea656e2ad53542f43715 Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 19 Feb 2008 15:45:18 +0000 Subject: [PATCH] added missing commit. updated po perms to allow for object-specific perms on POs git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8774 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm index 59825d2a30..7755fc147f 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm @@ -563,8 +563,10 @@ sub create_po_lineitem { my $po = $e->retrieve_acq_purchase_order($po_li->purchase_order) or return $e->die_event; - return OpenILS::Event->new('BAD_PARAMS') - unless $e->requestor->id == $po->owner; + if($e->requestor->id != $po->owner) { + return $e->die_event unless + $e->allowed('MANAGE_PURCHASE_ORDER', undef, $po); + } if($$options{picklist_entry}) { # if a picklist_entry ID is provided, use that as the basis for this item @@ -587,6 +589,7 @@ sub create_po_lineitem { return $e->die_event unless $e->allowed('MANAGE_PROVIDER', $provider->owner, $provider); $e->create_acq_po_lineitem($po_li) or return $e->die_event; + $e->commit; return $po_li->id; } -- 2.11.0