[LON-CAPA-cvs] cvs: loncom /auth lonwebdavauth.pm

raeburn raeburn at source.lon-capa.org
Sun Jan 29 19:16:31 EST 2017


raeburn		Mon Jan 30 00:16:31 2017 EDT

  Modified files:              
    /loncom/auth	lonwebdavauth.pm 
  Log:
  - Need to set $r->user() for user in existing webDAV session with Apache 2.4 
  
  
Index: loncom/auth/lonwebdavauth.pm
diff -u loncom/auth/lonwebdavauth.pm:1.6 loncom/auth/lonwebdavauth.pm:1.7
--- loncom/auth/lonwebdavauth.pm:1.6	Tue Aug 16 20:17:49 2016
+++ loncom/auth/lonwebdavauth.pm	Mon Jan 30 00:16:31 2017
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Authentication Handler for webDAV access to Authoring Space.
 #
-# $Id: lonwebdavauth.pm,v 1.6 2016/08/16 20:17:49 raeburn Exp $
+# $Id: lonwebdavauth.pm,v 1.7 2017/01/30 00:16:31 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -164,6 +164,13 @@
                 if (&Apache::lonnet::homeserver($uname,$udom) eq $uhome) {
                     &Apache::lonnet::transfer_profile_to_env($sessiondir,$handle);
                     if (&Apache::lonnet::usertools_access($uname,$udom,'webdav')) {
+                        if ($r->user() eq '') {
+                            if ($env{'user.domain'} eq $r->dir_config('lonDefDomain')) {
+                                $r->user($env{'user.name'});
+                            } else {
+                                $r->user($env{'user.name'}.':'.$env{'user.domain'});
+                            }
+                        }
                         return OK;
                     } else {
                         return FORBIDDEN;




More information about the LON-CAPA-cvs mailing list