[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm /lonnet/perl lonnet.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 17 Dec 2004 22:40:10 -0000
albertel Fri Dec 17 17:40:10 2004 EDT
Modified files:
/loncom/interface lonnavmaps.pm
/loncom/lonnet/perl lonnet.pm
Log:
- need to pass symb to allowed somtimes, like when we are scanning the whole course and &symbread is likely to get things wrong
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.310 loncom/interface/lonnavmaps.pm:1.311
--- loncom/interface/lonnavmaps.pm:1.310 Tue Dec 14 10:56:41 2004
+++ loncom/interface/lonnavmaps.pm Fri Dec 17 17:40:09 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.310 2004/12/14 15:56:41 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.311 2004/12/17 22:40:09 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4725,7 +4725,8 @@
return $self->{BROWSE_PRIV};
}
- $self->{BROWSE_PRIV} = &Apache::lonnet::allowed('bre', $self->src());
+ $self->{BROWSE_PRIV} = &Apache::lonnet::allowed('bre',$self->src(),
+ $self->symb());
}
=pod
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.578 loncom/lonnet/perl/lonnet.pm:1.579
--- loncom/lonnet/perl/lonnet.pm:1.578 Thu Dec 16 16:30:21 2004
+++ loncom/lonnet/perl/lonnet.pm Fri Dec 17 17:40:09 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.578 2004/12/16 21:30:21 banghart Exp $
+# $Id: lonnet.pm,v 1.579 2004/12/17 22:40:09 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2777,7 +2777,7 @@
# ------------------------------------------------- Check for a user privilege
sub allowed {
- my ($priv,$uri)=@_;
+ my ($priv,$uri,$symb)=@_;
$uri=&deversion($uri);
my $orguri=$uri;
$uri=&declutter($uri);
@@ -3058,7 +3058,7 @@
if ($thisallowed=~/X/) {
if ($ENV{'acc.randomout'}) {
- my $symb=&symbread($uri,1);
+ if (!$symb) { $symb=&symbread($uri,1); }
if (($symb) && ($ENV{'acc.randomout'}=~/\&\Q$symb\E\&/)) {
return '';
}