--- loncom/auth/lonacc.pm 2020/01/22 18:10:12 1.159.2.8.2.1 +++ loncom/auth/lonacc.pm 2020/07/19 16:41:27 1.159.2.8.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.159.2.8.2.1 2020/01/22 18:10:12 raeburn Exp $ +# $Id: lonacc.pm,v 1.159.2.8.2.2 2020/07/19 16:41:27 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -604,7 +604,7 @@ sub handler { # ---------------------------------------------------------------- Check access my $now = time; - if ($requrl !~ m{^/(?:adm|public|prtspool)/} + if ($requrl !~ m{^/(?:adm|public|(?:prt|zip)spool)/} || $requrl =~ /^\/adm\/.*\/(smppg|bulletinboard)(\?|$ )/x) { my $access=&Apache::lonnet::allowed('bre',$requrl); if ($handle eq '') { @@ -699,9 +699,16 @@ sub handler { } if ($env{'form.symb'}) { $symb=&Apache::lonnet::symbclean($env{'form.symb'}); - if ($requrl =~ m|^/adm/wrapper/| + if ($requrl eq '/adm/navmaps') { + my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); + &Apache::lonnet::symblist($map,$murl => [$murl,$mid]); + } elsif ($requrl =~ m|^/adm/wrapper/| || $requrl =~ m|^/adm/coursedocs/showdoc/|) { my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); + if ($map =~ /\.page$/) { + my $mapsymb = &Apache::lonnet::symbread($map); + ($map,$mid,$murl)=&Apache::lonnet::decode_symb($mapsymb); + } &Apache::lonnet::symblist($map,$murl => [$murl,$mid], 'last_known' =>[$murl,$mid]); } elsif ((&Apache::lonnet::symbverify($symb,$requrl)) || @@ -710,6 +717,10 @@ sub handler { (($requrl=~m|(.*/aboutme)/portfolio$|) && &Apache::lonnet::symbverify($symb,$1))) { my ($map,$mid,$murl)=&Apache::lonnet::decode_symb($symb); + if (($map =~ /\.page$/) && ($requrl !~ /\.page$/)) { + my $mapsymb = &Apache::lonnet::symbread($map); + ($map,$mid,$murl)=&Apache::lonnet::decode_symb($mapsymb); + } &Apache::lonnet::symblist($map,$murl => [$murl,$mid], 'last_known' =>[$murl,$mid]); } else { @@ -735,8 +746,16 @@ sub handler { if ($symb) { my ($map,$mid,$murl)= &Apache::lonnet::decode_symb($symb); - &Apache::lonnet::symblist($map,$murl =>[$murl,$mid], - 'last_known' =>[$murl,$mid]); + if ($requrl eq '/adm/navmaps') { + &Apache::lonnet::symblist($map,$murl =>[$murl,$mid]); + } else { + if (($map =~ /\.page$/) && ($requrl !~ /\.page$/)) { + my $mapsymb = &Apache::lonnet::symbread($map); + ($map,$mid,$murl)=&Apache::lonnet::decode_symb($mapsymb); + } + &Apache::lonnet::symblist($map,$murl =>[$murl,$mid], + 'last_known' =>[$murl,$mid]); + } } } }