[open-ils-commits] r8686 -
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Feb 7 13:07:18 EST 2008
Author: erickson
Date: 2008-02-07 12:38:41 -0500 (Thu, 07 Feb 2008)
New Revision: 8686
Modified:
branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm
Log:
making object specific permission calls by default
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-02-07 17:37:29 UTC (rev 8685)
+++ branches/acq-experiment/Open-ILS/src/perlmods/OpenILS/Application/Acq/Financials.pm 2008-02-07 17:38:41 UTC (rev 8686)
@@ -35,7 +35,7 @@
my($self, $conn, $auth, $funding_source) = @_;
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('ADMIN_FUNDING_SOURCE', $funding_source->owner);
+ return $e->die_event unless $e->allowed('ADMIN_FUNDING_SOURCE', $funding_source->owner, $funding_source);
$e->create_acq_funding_source($funding_source) or return $e->die_event;
$e->commit;
return $funding_source->id;
@@ -60,7 +60,7 @@
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
my $funding_source = $e->retrieve_acq_funding_source($funding_source_id) or return $e->die_event;
- return $e->die_event unless $e->allowed('ADMIN_FUNDING_SOURCE', $funding_source->owner);
+ return $e->die_event unless $e->allowed('ADMIN_FUNDING_SOURCE', $funding_source->owner, $funding_source);
$e->delete_acq_funding_source($funding_source) or return $e->die_event;
$e->commit;
return 1;
@@ -85,7 +85,7 @@
return $e->event unless $e->checkauth;
my $funding_source = $e->retrieve_acq_funding_source($funding_source_id) or return $e->event;
return $e->event unless $e->allowed(
- ['ADMIN_FUNDING_SOURCE','MANAGE_FUNDING_SOURCE'], $funding_source->owner);
+ ['ADMIN_FUNDING_SOURCE','MANAGE_FUNDING_SOURCE'], $funding_source->owner, $funding_source);
return $funding_source;
}
@@ -141,7 +141,7 @@
my($self, $conn, $auth, $fund) = @_;
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('ADMIN_FUND', $fund->org);
+ return $e->die_event unless $e->allowed('ADMIN_FUND', $fund->org, $fund);
$e->create_acq_fund($fund) or return $e->die_event;
$e->commit;
return $fund->id;
@@ -166,7 +166,7 @@
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
my $fund = $e->retrieve_acq_fund($fund_id) or return $e->die_event;
- return $e->die_event unless $e->allowed('ADMIN_FUND', $fund->org);
+ return $e->die_event unless $e->allowed('ADMIN_FUND', $fund->org, $fund);
$e->delete_acq_fund($fund) or return $e->die_event;
$e->commit;
return 1;
@@ -191,7 +191,7 @@
return $e->event unless $e->checkauth;
my $fund = $e->retrieve_acq_fund($fund_id) or return $e->event;
return $e->event unless
- $e->allowed(['ADMIN_FUND','MANAGE_FUND'], $fund->org);
+ $e->allowed(['ADMIN_FUND','MANAGE_FUND'], $fund->org, $fund);
$fund->summary(retrieve_fund_summary_impl($e, $fund))
if $$options{flesh_summary};
return $fund;
@@ -255,7 +255,7 @@
my $e = new_editor(authtoken=>$auth);
return $e->event unless $e->checkauth;
my $fund = $e->retrieve_acq_fund($fund_id) or return $e->event;
- return $e->event unless $e->allowed('MANAGE_FUND', $fund->org);
+ return $e->event unless $e->allowed('MANAGE_FUND', $fund->org, $fund);
return retrieve_fund_summary_impl($e, $fund);
}
@@ -307,10 +307,10 @@
my $source = $e->retrieve_acq_funding_source($fund_alloc->funding_source)
or return $e->die_event;
- return $e->die_event unless $e->allowed('MANAGE_FUNDING_SOURCE', $source->owner);
+ return $e->die_event unless $e->allowed('MANAGE_FUNDING_SOURCE', $source->owner, $source);
my $fund = $e->retrieve_acq_fund($fund_alloc->fund) or return $e->die_event;
- return $e->die_event unless $e->allowed('MANAGE_FUND', $fund->org);
+ return $e->die_event unless $e->allowed('MANAGE_FUND', $fund->org, $fund);
$fund_alloc->allocator($e->requestor->id);
$e->create_acq_fund_allocation($fund_alloc) or return $e->die_event;
@@ -341,10 +341,10 @@
my $source = $e->retrieve_acq_funding_source($fund_alloc->funding_source)
or return $e->die_event;
- return $e->die_event unless $e->allowed('MANAGE_FUNDING_SOURCE', $source->owner);
+ return $e->die_event unless $e->allowed('MANAGE_FUNDING_SOURCE', $source->owner, $source);
my $fund = $e->retrieve_acq_fund($fund_alloc->fund) or return $e->die_event;
- return $e->die_event unless $e->allowed('MANAGE_FUND', $fund->org);
+ return $e->die_event unless $e->allowed('MANAGE_FUND', $fund->org, $fund);
$e->delete_acq_fund_allocation($fund_alloc) or return $e->die_event;
$e->commit;
@@ -372,10 +372,10 @@
my $source = $e->retrieve_acq_funding_source($fund_alloc->funding_source)
or return $e->die_event;
- return $e->die_event unless $e->allowed('MANAGE_FUNDING_SOURCE', $source->owner);
+ return $e->die_event unless $e->allowed('MANAGE_FUNDING_SOURCE', $source->owner, $source);
my $fund = $e->retrieve_acq_fund($fund_alloc->fund) or return $e->die_event;
- return $e->die_event unless $e->allowed('MANAGE_FUND', $fund->org);
+ return $e->die_event unless $e->allowed('MANAGE_FUND', $fund->org, $fund);
return $fund_alloc;
}
More information about the open-ils-commits
mailing list