[open-ils-commits] r9784 - trunk/Open-ILS/src/perlmods/OpenILS/WWW
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jun 6 22:25:00 EDT 2008
Author: miker
Date: 2008-06-06 22:24:58 -0400 (Fri, 06 Jun 2008)
New Revision: 9784
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
Log:
allow public containers (such as bookbags) to be exported
Modified: trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2008-06-07 00:39:33 UTC (rev 9783)
+++ trunk/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm 2008-06-07 02:24:58 UTC (rev 9784)
@@ -88,11 +88,14 @@
# 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;
}
More information about the open-ils-commits
mailing list