[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm

www lon-capa-cvs@mail.lon-capa.org
Thu, 09 Jan 2003 22:45:51 -0000


www		Thu Jan  9 17:45:51 2003 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  Bug 1140 for 0.6.1 (might have to be backported).
  navmaps (and thus also quickgrades) was checking permissions not only
  on individual resources, but also on sequences (folders). That failed
  for uploaded course sequences. Rather than removing this from navmaps,
  allowed now explicitly allows access.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.313 loncom/lonnet/perl/lonnet.pm:1.314
--- loncom/lonnet/perl/lonnet.pm:1.313	Mon Dec  9 17:09:58 2002
+++ loncom/lonnet/perl/lonnet.pm	Thu Jan  9 17:45:51 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.313 2002/12/09 22:09:58 matthew Exp $
+# $Id: lonnet.pm,v 1.314 2003/01/09 22:45:51 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1864,6 +1864,12 @@
        $thisallowed.=$1;
     }
 
+# URI is an uploaded document for this course
+
+    if (($priv eq 'bre') && 
+        ($uri=~/^uploaded\/$ENV{'course.'.$ENV{'request.course.id'}.'.domain'}\/$ENV{'course.'.$ENV{'request.course.id'}.'.num'}/)) {
+        return 'F';
+    }
 # Full access at system, domain or course-wide level? Exit.
 
     if ($thisallowed=~/F/) {