[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonrecommender.pm

www www at source.lon-capa.org
Tue Jul 17 08:41:46 EDT 2012


www		Tue Jul 17 12:41:46 2012 EDT

  Modified files:              
    /modules/gerd/harvesting	lonrecommender.pm 
  Log:
  Checking browsing privileges
  
  
Index: modules/gerd/harvesting/lonrecommender.pm
diff -u modules/gerd/harvesting/lonrecommender.pm:1.15 modules/gerd/harvesting/lonrecommender.pm:1.16
--- modules/gerd/harvesting/lonrecommender.pm:1.15	Tue Jul 17 01:23:28 2012
+++ modules/gerd/harvesting/lonrecommender.pm	Tue Jul 17 12:41:46 2012
@@ -5,7 +5,7 @@
 #
 # MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
 #
-# $Id: lonrecommender.pm,v 1.15 2012/07/17 01:23:28 www Exp $
+# $Id: lonrecommender.pm,v 1.16 2012/07/17 12:41:46 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -564,6 +564,11 @@
       } elsif ($uri!~/\.(page|sequence)$/) {
          $fn=$uri.'/'.$fn;
          $fn=~s/\/+/\//gs;
+# allowed to see this?
+         if ($components[15] ne '1') { 
+            unless ((&Apache::lonnet::allowed('bre',$fn)) || 
+                    (&Apache::lonnet::allowed('bro',$fn))) { next; }
+         }
       }
       my $dirflag=0;
       my $addflag=1;
@@ -599,6 +604,9 @@
 sub handle_request {
     my ($r,$c)=@_;
 # ------
+# Only advanced users should get here
+    unless ($env{'user.adv'}) { return; }
+# ------
 # Get the existing basket
 # This is what the user already has in his or her folder
 #




More information about the LON-CAPA-cvs mailing list