--- loncom/interface/lonindexer.pm 2003/03/19 14:50:32 1.63 +++ loncom/interface/lonindexer.pm 2003/06/14 00:15:01 1.66 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.63 2003/03/19 14:50:32 ng Exp $ +# $Id: lonindexer.pm,v 1.66 2003/06/14 00:15:01 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -124,7 +124,7 @@ sub handler { $extrafield=''; my $diropendb = - "/home/httpd/perl/tmp/$domain\_$ENV{'user.name'}_indexer.db"; + "/home/httpd/perl/tmp/$ENV{'user.domain'}_$ENV{'user.name'}_indexer.db"; if (tie(%hash,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) { if ($ENV{'form.launch'} eq '1') { @@ -666,6 +666,9 @@ sub display_line { $r->print("Up $tabtag\n"); return OK; } +# Do we have permission to look at this? + + return OK if (!&Apache::lonnet::allowed('bre',$startdir.$filecom[0])); # display domain if ($filecom[1] eq 'domain') { @@ -723,7 +726,6 @@ sub display_line { # display file if ($fnptr == 0 and $filecom[3] ne '') { my $filelink = $startdir.$filecom[0]; - return OK if (!&Apache::lonnet::allowed('bre',$filelink)); my @file_ext = split (/\./,$listname); my $curfext = $file_ext[-1]; if (@Omit) {