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

banghart lon-capa-cvs@mail.lon-capa.org
Tue, 21 Sep 2004 22:38:11 -0000


banghart		Tue Sep 21 18:38:11 2004 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  	modify sub allowed to permit user to browse portfolio space
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.544 loncom/lonnet/perl/lonnet.pm:1.545
--- loncom/lonnet/perl/lonnet.pm:1.544	Mon Sep 20 16:11:16 2004
+++ loncom/lonnet/perl/lonnet.pm	Tue Sep 21 18:38:10 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.544 2004/09/20 20:11:16 albertel Exp $
+# $Id: lonnet.pm,v 1.545 2004/09/21 22:38:10 banghart Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2774,7 +2774,9 @@
     $uri=&deversion($uri);
     my $orguri=$uri;
     $uri=&declutter($uri);
-
+    
+    
+    
     if (defined($ENV{'allowed.'.$priv})) { return $ENV{'allowed.'.$priv}; }
 # Free bre access to adm and meta resources
     if (((($uri=~/^adm\//) && ($uri !~ m|/bulletinboard$|)) 
@@ -2782,6 +2784,12 @@
 	return 'F';
     }
 
+# Free bre access to user's own portfolio contents
+    $uri=~m:([^/]+)/([^/]+)/([^/]+)/([^/]+)/:;
+    if (('uploaded' eq $1)&&($ENV{'user.name'} eq $3) && ($ENV{'user.domain'} eq $2) && ('portfolio' eq $4)) {
+        return 'F';
+    }
+
 # Free bre to public access
 
     if ($priv eq 'bre') {