From 604c09892098f3c58e28321aa82bb8f7950eb764 Mon Sep 17 00:00:00 2001 From: miker Date: Sat, 7 Jun 2008 02:24:58 +0000 Subject: [PATCH] allow public containers (such as bookbags) to be exported git-svn-id: svn://svn.open-ils.org/ILS/trunk@9784 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm index 1b93f236fe..4e42171c37 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm @@ -88,11 +88,14 @@ sub handler { # still no records ... my $container = $cgi->param('containerid'); if ($container) { - my $authid = $cgi->cookie('ses') || $cgi->param('ses'); - my $auth = verify_login($authid); - if (!$auth) { - return 403; - } + my $bucket = $ses->request( 'open-ils.cstore.direct.container.biblio_record_entry_bucket.retrieve', $container )->gather(1); + if ($bucket->pub !~ /t|1/oi) { + my $authid = $cgi->cookie('ses') || $cgi->param('ses'); + my $auth = verify_login($authid); + if (!$auth) { + return 403; + } + } my $recs = $ses->request( 'open-ils.cstore.direct.container.biblio_record_entry_bucket_item.search.atomic', { bucket => $container } )->gather(1); @records = map { ($_->target_biblio_record_entry) } @$recs; } -- 2.11.0