[open-ils-commits] r10489 -
trunk/Open-ILS/src/perlmods/OpenILS/Application
svn at svn.open-ils.org
svn at svn.open-ils.org
Sat Aug 30 12:02:32 EDT 2008
Author: erickson
Date: 2008-08-30 12:02:29 -0400 (Sat, 30 Aug 2008)
New Revision: 10489
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Log:
make sure to grab the correct queue type for perm checking
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2008-08-30 15:42:23 UTC (rev 10488)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm 2008-08-30 16:02:29 UTC (rev 10489)
@@ -206,9 +206,16 @@
my $e = new_editor(authtoken => $auth, xact => 1);
return $e->die_event unless $e->checkauth;
- my $queue = $e->retrieve_vandelay_queue($queue_id) or return $e->die_event;
- my $type = ($self->api_name =~ /auth/) ? 'auth' : 'bib';
+ my $queue;
+ my $type = $self->{record_type};
+
+ if($type eq 'bib') {
+ $queue = $e->retrieve_vandelay_bib_queue($queue_id) or return $e->die_event;
+ } else {
+ $queue = $e->retrieve_vandelay_authority_queue($queue_id) or return $e->die_event;
+ }
+
my $evt = check_queue_perms($e, $type, $queue);
return $evt if $evt;
@@ -241,7 +248,7 @@
$xml = entityize($xml);
$xml =~ s/[\x00-\x1f]//go;
- if ($self->{record_type} eq 'bib') {
+ if ($type eq 'bib') {
_add_bib_rec( $e, $xml, $queue_id, $purpose ) or return $e->die_event;
} else {
_add_auth_rec( $e, $xml, $queue_id, $purpose ) or return $e->die_event;
@@ -296,8 +303,13 @@
my $e = new_editor(authtoken => $auth);
return $e->event unless $e->checkauth;
- my $queue = $e->retrieve_vandelay_bib_queue($queue_id) or return $e->event;
my $type = $self->{record_type};
+ my $queue;
+ if($type eq 'bib') {
+ $queue = $e->retrieve_vandelay_bib_queue($queue_id) or return $e->die_event;
+ } else {
+ $queue = $e->retrieve_vandelay_authority_queue($queue_id) or return $e->die_event;
+ }
my $evt = check_queue_perms($e, $type, $queue);
return $evt if $evt;
@@ -348,4 +360,3 @@
1;
-
More information about the open-ils-commits
mailing list