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

raeburn raeburn at source.lon-capa.org
Mon Aug 28 16:40:00 EDT 2023


raeburn		Mon Aug 28 20:40:00 2023 EDT

  Modified files:              
    /loncom	loncapa_apache.conf 
    /loncom/auth	lonacc.pm 
  Log:
  - Use standard LON-CAPA error documents for 406, 403 and 500 errors for
    /daxeopen/.
  - Use loncacc.pm as authz handler for /daxeopen/priv/domain/username/
  - Use lonacc.pm as authz handler for /daxeopen/, /daxeopen/priv/, and 
    /daxeopen/priv/domain/
  
  
Index: loncom/loncapa_apache.conf
diff -u loncom/loncapa_apache.conf:1.282 loncom/loncapa_apache.conf:1.283
--- loncom/loncapa_apache.conf:1.282	Mon Aug 28 18:58:45 2023
+++ loncom/loncapa_apache.conf	Mon Aug 28 20:40:00 2023
@@ -2,7 +2,7 @@
 ## loncapa_apache.conf -- Apache HTTP LON-CAPA configuration file
 ##
 
-# $Id: loncapa_apache.conf,v 1.282 2023/08/28 18:58:45 raeburn Exp $
+# $Id: loncapa_apache.conf,v 1.283 2023/08/28 20:40:00 raeburn Exp $
 
 #
 # LON-CAPA Section (extensions to httpd.conf daemon configuration)
@@ -503,6 +503,26 @@
 PerlAuthzHandler       Apache::lonacc
 </LocationMatch>
 
+<LocationMatch "^/daxeopen/priv/[^/]+/[^/]+/">
+AuthType LONCAPA
+Require valid-user
+PerlAuthzHandler       Apache::loncacc
+</LocationMatch>
+
+<LocationMatch "^/daxeopen/(res/|$)">
+ErrorDocument     403 /adm/login
+ErrorDocument     404 /adm/notfound.html
+ErrorDocument     406 /adm/roles
+ErrorDocument     500 /adm/errorhandler
+</LocationMatch>
+
+<LocationMatch "^/daxeopen/priv/">
+ErrorDocument     403 /adm/login
+ErrorDocument     404 /adm/notfound.html
+ErrorDocument     406 /adm/unauthorized
+ErrorDocument     500 /adm/errorhandler
+</LocationMatch>
+
 <LocationMatch "^/daxe(page|open)/uploaded/">
 AuthType LONCAPA
 Require valid-user
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.209 loncom/auth/lonacc.pm:1.210
--- loncom/auth/lonacc.pm:1.209	Mon Aug 28 18:58:45 2023
+++ loncom/auth/lonacc.pm	Mon Aug 28 20:40:00 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.209 2023/08/28 18:58:45 raeburn Exp $
+# $Id: lonacc.pm,v 1.210 2023/08/28 20:40:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -991,6 +991,9 @@
                 }
                 my $clientip = &Apache::lonnet::get_requestor_ip($r);
                 $access=&Apache::lonnet::allowed('bre',$requrl,'','',$clientip,'','',$nodeeplinkcheck);
+                if (($requrl =~ m{^/daxeopen/priv/}) && ($access eq '')) {
+                    $env{'request.editurl'}=$requrl;
+                }
             }
         }
         if ($check_block) {




More information about the LON-CAPA-cvs mailing list