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

banghart lon-capa-cvs-allow@mail.lon-capa.org
Thu, 26 Apr 2007 18:31:54 -0000


banghart		Thu Apr 26 14:31:54 2007 EDT

  Modified files:              
    /loncom/auth	lonacc.pm 
  Log:
  	Add access info for multidownload of student submissions.
  
  
Index: loncom/auth/lonacc.pm
diff -u loncom/auth/lonacc.pm:1.108 loncom/auth/lonacc.pm:1.109
--- loncom/auth/lonacc.pm:1.108	Wed Apr 11 17:36:58 2007
+++ loncom/auth/lonacc.pm	Thu Apr 26 14:31:53 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Cookie Based Access Handler
 #
-# $Id: lonacc.pm,v 1.108 2007/04/11 21:36:58 raeburn Exp $
+# $Id: lonacc.pm,v 1.109 2007/04/26 18:31:53 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -290,6 +290,14 @@
 		return HTTP_NOT_ACCEPTABLE;
 	    }
 	}
+	if ($requrl =~ m|^/zipspool/|) {
+	    my $start='/zipspool/zipout/'.$env{'user.name'}.
+		$env{'user.domain'};
+	    if ($requrl !~ /^\Q$start\E/) {
+		$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied";
+		return HTTP_NOT_ACCEPTABLE;
+	    }
+	}
 	if ($env{'user.name'} eq 'public' && 
 	    $env{'user.domain'} eq 'public' &&
 	    $requrl !~ m{^/+(res|public|uploaded)/} &&