allow public containers (such as bookbags) to be exported
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 7 Jun 2008 02:24:58 +0000 (02:24 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sat, 7 Jun 2008 02:24:58 +0000 (02:24 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@9784 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm

index 1b93f23..4e42171 100644 (file)
@@ -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;
        }