--- loncom/lonnet/perl/lonnet.pm 2005/10/28 21:51:50 1.670 +++ loncom/lonnet/perl/lonnet.pm 2005/10/29 02:52:50 1.671 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.670 2005/10/28 21:51:50 albertel Exp $ +# $Id: lonnet.pm,v 1.671 2005/10/29 02:52:50 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3106,20 +3106,26 @@ sub allowed { # not allowing 'edit' access (editupload) to uploaded course docs if (($priv eq 'bre') && ($uri=~m|^uploaded/|)) { $thisallowed=''; - my $refuri=$env{'httpref.'.$orguri}; - if ($refuri) { - if ($refuri =~ m|^/adm/|) { - $thisallowed='F'; - } else { - $refuri=&declutter($refuri); - my ($match) = &is_on_map($refuri); - if ($match) { + my ($match)=&is_on_map($uri); + if ($match) { + if ($env{'user.priv.'.$env{'request.role'}.'./'} + =~/\Q$priv\E\&([^\:]*)/) { + $thisallowed.=$1; + } + } else { + my $refuri=$env{'httpref.'.$orguri}; + if ($refuri) { + if ($refuri =~ m|^/adm/|) { $thisallowed='F'; + } else { + $refuri=&declutter($refuri); + my ($match) = &is_on_map($refuri); + if ($match) { + $thisallowed='F'; + } } - } - } else { - $thisallowed=''; - } + } + } } # Full access at system, domain or course-wide level? Exit.