[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 04 Aug 2006 21:33:35 -0000
albertel Fri Aug 4 17:33:35 2006 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- which checking permissions for the .meta file actually check the permissins of the non .meta file
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.768 loncom/lonnet/perl/lonnet.pm:1.769
--- loncom/lonnet/perl/lonnet.pm:1.768 Fri Aug 4 15:42:59 2006
+++ loncom/lonnet/perl/lonnet.pm Fri Aug 4 17:33:34 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.768 2006/08/04 19:42:59 albertel Exp $
+# $Id: lonnet.pm,v 1.769 2006/08/04 21:33:34 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -3475,7 +3475,8 @@
if (defined($env{'allowed.'.$priv})) { return $env{'allowed.'.$priv}; }
# Free bre access to adm and meta resources
if (((($uri=~/^adm\//) && ($uri !~ m|/bulletinboard$|))
- || ($uri=~/\.meta$/)) && ($priv eq 'bre')) {
+ || (($uri=~/\.meta$/) && ($uri!~m|^uploaded/|) ))
+ && ($priv eq 'bre')) {
return 'F';
}
@@ -4914,11 +4915,13 @@
sub get_access_controls {
my ($current_permissions,$group,$file) = @_;
- my %access;
+ my %access;
+ my $real_file = $file;
+ $file =~ s/\.meta$//;
if (defined($file)) {
if (ref($$current_permissions{$file."\0".'accesscontrol'}) eq 'HASH') {
foreach my $control (keys(%{$$current_permissions{$file."\0".'accesscontrol'}})) {
- $access{$file}{$control} = $$current_permissions{$file."\0".$control};
+ $access{$real_file}{$control} = $$current_permissions{$file."\0".$control};
}
}
} else {