[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /auth londatecheck.pm /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 23 Aug 2004 19:34:01 -0000


albertel		Mon Aug 23 15:34:01 2004 EDT

  Modified files:              
    /loncom/auth	londatecheck.pm 
    /loncom/lonnet/perl	lonnet.pm 
    /loncom	loncapa_apache.conf 
  Log:
  - concord, bulletinboards can have contentopen/close dates and other content style parameters.
  
  
  
Index: loncom/auth/londatecheck.pm
diff -u loncom/auth/londatecheck.pm:1.6 loncom/auth/londatecheck.pm:1.7
--- loncom/auth/londatecheck.pm:1.6	Mon Aug 23 15:16:53 2004
+++ loncom/auth/londatecheck.pm	Mon Aug 23 15:34:00 2004
@@ -1,5 +1,5 @@
 # Checks contentopen/close settings disable subsequent PerlHandlers if not open
-# $Id: londatecheck.pm,v 1.6 2004/08/23 19:16:53 albertel Exp $
+# $Id: londatecheck.pm,v 1.7 2004/08/23 19:34:00 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -49,7 +49,7 @@
 
 sub handler {
     my ($r)=@_;
-    if (&Apache::lonnet::allowed('bre',$ENV{'request.filename'}) eq 'F') {
+    if (&Apache::lonnet::allowed('bre',$r->uri) eq 'F') {
 	return OK;
     }
     my ($status,$open,$close,$msg)=&content_date_check();
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.528 loncom/lonnet/perl/lonnet.pm:1.529
--- loncom/lonnet/perl/lonnet.pm:1.528	Mon Aug 23 11:56:46 2004
+++ loncom/lonnet/perl/lonnet.pm	Mon Aug 23 15:34:01 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.528 2004/08/23 15:56:46 sakharuk Exp $
+# $Id: lonnet.pm,v 1.529 2004/08/23 19:34:01 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2697,8 +2697,8 @@
 
     if (defined($ENV{'allowed.'.$priv})) { return $ENV{'allowed.'.$priv}; }
 # Free bre access to adm and meta resources
-
-    if ((($uri=~/^adm\//) || ($uri=~/\.meta$/)) && ($priv eq 'bre')) {
+    if (((($uri=~/^adm\//) && ($uri !~ m|/bulletinboard$|)) 
+	 || ($uri=~/\.meta$/)) && ($priv eq 'bre')) {
 	return 'F';
     }
 
@@ -4197,7 +4197,9 @@
     my ($uri,$what,$liburi,$prefix,$depthcount)=@_;
     $uri=&declutter($uri);
     # if it is a non metadata possible uri return quickly
-    if (($uri eq '') || (($uri =~ m|^/*adm/|) && ($uri !~ m|^adm/includes|)) ||
+    if (($uri eq '') || 
+	(($uri =~ m|^/*adm/|) && 
+	     ($uri !~ m|^adm/includes|) && ($uri !~ m|/bulletinboard$|)) ||
         ($uri =~ m|/$|) || ($uri =~ m|/.meta$|) || ($uri =~ /^~/) ||
 	($uri =~ m|home/[^/]+/public_html/|)) {
 	return undef;
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.93 loncom/loncapa_apache.conf:1.94
--- loncom/loncapa_apache.conf:1.93	Fri Aug 13 11:48:39 2004
+++ loncom/loncapa_apache.conf	Mon Aug 23 15:34:01 2004
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.93 2004/08/13 15:48:39 albertel Exp $
+## $Id: loncapa_apache.conf,v 1.94 2004/08/23 19:34:01 albertel Exp $
 ##
 
 #
@@ -131,6 +131,7 @@
 <LocationMatch "^/adm/.*/bulletinboard$">
 PerlAccessHandler	Apache::lonacc
 SetHandler              perl-script
+PerlHandler             Apache::londatecheck
 PerlHandler             Apache::lonbulletin
 ErrorDocument     404 /adm/notfound.html
 ErrorDocument     406 /adm/notinit.html