[LON-CAPA-cvs] cvs: loncom / loncapa_apache.conf /auth lonacc.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 07 Jul 2005 21:38:39 -0000


albertel		Thu Jul  7 17:38:39 2005 EDT

  Modified files:              
    /loncom	loncapa_apache.conf 
    /loncom/auth	lonacc.pm 
  Log:
  - need to use lonacc when accessing .hlp files to get session env, but need to also allow public access to help files
  
  
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.113 loncom/loncapa_apache.conf:1.114
--- loncom/loncapa_apache.conf:1.113	Thu Jun 23 19:07:03 2005
+++ loncom/loncapa_apache.conf	Thu Jul  7 17:38:35 2005
@@ -1,7 +1,7 @@
 ##
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
-## $Id: loncapa_apache.conf,v 1.113 2005/06/23 23:07:03 www Exp $
+## $Id: loncapa_apache.conf,v 1.114 2005/07/07 21:38:35 albertel Exp $
 ##
 
 #
@@ -830,7 +830,7 @@
 </Location>
 
 <LocationMatch "^/adm/help/.*\.hlp$">
-#PerlAccessHandler	Apache::lonacc
+PerlAccessHandler	Apache::lonacc
 SetHandler perl-script
 PerlHandler Apache::lonhelp
 </LocationMatch>
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.67 loncom/auth/lonacc.pm:1.68
--- loncom/auth/lonacc.pm:1.67	Thu Jul  7 01:53:35 2005
+++ loncom/auth/lonacc.pm	Thu Jul  7 17:38:35 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.67 2005/07/07 05:53:35 albertel Exp $
+# $Id: lonacc.pm,v 1.68 2005/07/07 21:38:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -95,7 +95,7 @@
 	    if ($env{'user.name'} eq 'public' && 
 		$env{'user.domain'} eq 'public' &&
 		$requrl !~ m{^/+(res|public)/} &&
-		$requrl !~ m{^/+adm/(roles|logout|randomlabel\.png)}) {
+		$requrl !~ m{^/+adm/(help|roles|logout|randomlabel\.png)}) {
 		$env{'request.querystring'}=$r->args;
 		$env{'request.firsturl'}=$requrl;
 		return FORBIDDEN;
@@ -179,6 +179,9 @@
 	$r->header_out('Set-cookie',"lonID=$cookie; path=/");
         return OK;
     }
+    if ($requrl=~m|^/+adm/+help/+|) {
+	return OK;
+    }
 # -------------------------------------------------------------- Not authorized
     $requrl=~/\.(\w+)$/;
 #    if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') ||