[open-ils-commits] r9660 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed May 21 22:25:53 EDT 2008
Author: erickson
Date: 2008-05-21 22:25:52 -0400 (Wed, 21 May 2008)
New Revision: 9660
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
Log:
also checking create-po perm based on ordering agency as wel
Modified: branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
===================================================================
--- branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm 2008-05-21 20:44:19 UTC (rev 9659)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm 2008-05-22 02:25:52 UTC (rev 9660)
@@ -545,15 +545,17 @@
my($self, $conn, $auth, $p_order) = @_;
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
+
$p_order->owner($e->requestor->id);
+ $p_order->ordering_agency($e->requestor->ws_ou);
+ return $e->die_event unless
+ $e->allowed('CREATE_PURCHASE_ORDER', $p_order->ordering_agency);
my $provider = $e->retrieve_acq_provider($p_order->provider)
or return $e->die_event;
+ return $e->die_event unless
+ $e->allowed('MANAGE_PROVIDER', $provider->owner, $provider);
- $p_order->ordering_agency($e->requestor->ws_ou) or return $e->die_event;
-
- return $e->die_event unless $e->allowed('MANAGE_PROVIDER', $provider->owner, $provider);
-
$e->create_acq_purchase_order($p_order) or return $e->die_event;
$e->commit;
return $p_order->id;
More information about the open-ils-commits
mailing list