r4600 - trunk/src/perl

walbridge at ecoinformatics.org walbridge at ecoinformatics.org
Wed Nov 19 18:26:46 PST 2008


Author: walbridge
Date: 2008-11-19 18:26:45 -0800 (Wed, 19 Nov 2008)
New Revision: 4600

Modified:
   trunk/src/perl/register-dataset.cgi
Log:
Update accessElement to accept a value for publicly readable

Modified: trunk/src/perl/register-dataset.cgi
===================================================================
--- trunk/src/perl/register-dataset.cgi	2008-11-20 01:16:15 UTC (rev 4599)
+++ trunk/src/perl/register-dataset.cgi	2008-11-20 02:26:45 UTC (rev 4600)
@@ -1696,6 +1696,11 @@
 }
 
 sub accessElement {
+    my $public = shift;
+    if (!$public) {
+        $public = $config->{'publicReadable'};
+    }
+               
     my $access = "";
 
     $access .= "<access authSystem=\"knb\" order=\"denyFirst\">\n";
@@ -1711,7 +1716,7 @@
         $access .= allowElement(getUsername(), 'read', 'write'); 
     }
 
-    if ($config->{'publicReadable'} eq "true") {
+    if ($public eq "true") {
         $access .= allowElement('public', 'read');
     }
     $access .= "</access>\n";



More information about the Metacat-cvs mailing list