[open-ils-commits] r9631 -
trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun May 18 12:02:30 EDT 2008
Author: erickson
Date: 2008-05-18 12:02:28 -0400 (Sun, 18 May 2008)
New Revision: 9631
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
Log:
for lack of a more context-specific perm org, checking some global perms agains workstation org
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-05-16 21:01:04 UTC (rev 9630)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat.pm 2008-05-18 16:02:28 UTC (rev 9631)
@@ -194,7 +194,7 @@
my $e = new_editor(authtoken=>$auth, xact=>1);
return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('CREATE_MARC');
+ return $e->die_event unless $e->allowed('CREATE_MARC', $e->requestor->ws_ou);
my $rec = $e->retrieve_biblio_record_entry($recid)
or return $e->die_event;
@@ -273,7 +273,7 @@
my $override = 1 if $self->api_name =~ /override/;
my $e = new_editor(xact=>1, authtoken=>$authtoken);
return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('IMPORT_MARC');
+ return $e->die_event unless $e->allowed('IMPORT_MARC', $e->requestor->ws_ou);
my( $evt, $tcn, $tcn_source, $marcdoc );
@@ -1013,10 +1013,13 @@
sub fix_copy_price {
my $copy = shift;
- my $p = $copy->price || 0;
- $p =~ s/\$//og;
- $copy->price($p);
+ if(defined $copy->price) {
+ my $p = $copy->price || 0;
+ $p =~ s/\$//og;
+ $copy->price($p);
+ }
+
my $d = $copy->deposit_amount || 0;
$d =~ s/\$//og;
$copy->deposit_amount($d);
@@ -1083,7 +1086,7 @@
my($self, $conn, $auth, $rec_id) = @_;
my $e = new_editor(xact=>1, authtoken=>$auth);
return $e->die_event unless $e->checkauth;
- return $e->die_event unless $e->allowed('DELETE_RECORD');
+ return $e->die_event unless $e->allowed('DELETE_RECORD', $e->requestor->ws_ou);
my $vols = $e->search_asset_call_number({record=>$rec_id, deleted=>'f'});
return OpenILS::Event->new('RECORD_NOT_EMPTY', payload=>$rec_id) if @$vols;
my $evt = delete_rec($e, $rec_id);
More information about the open-ils-commits
mailing list