--- loncom/auth/lonacc.pm 2011/11/18 22:41:02 1.130.6.1 +++ loncom/auth/lonacc.pm 2010/03/25 17:38:35 1.133 @@ -1,7 +1,7 @@ # The LearningOnline Network # Cookie Based Access Handler # -# $Id: lonacc.pm,v 1.130.6.1 2011/11/18 22:41:02 raeburn Exp $ +# $Id: lonacc.pm,v 1.133 2010/03/25 17:38:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -417,7 +417,7 @@ sub handler { my $preserved; foreach my $pair (split(/&/,$query)) { my ($name, $value) = split(/=/,$pair); - unless (($name eq 'symb') || ($name eq 'wrapperdisplay')) { + unless ($name eq 'symb') { $preserved .= $pair.'&'; } } @@ -452,8 +452,16 @@ sub handler { if ($requrl =~ m{^/res/}) { $access = &Apache::lonnet::allowed('bro',$requrl); if ($access ne 'F') { - $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; - return HTTP_NOT_ACCEPTABLE; + if ($requrl eq '/res/lib/templates/simpleproblem.problem/smpedit') { + $access = &Apache::lonnet::allowed('bre','/res/lib/templates/simpleproblem.problem'); + if ($access ne 'F') { + $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; + return HTTP_NOT_ACCEPTABLE; + } + } else { + $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; + return HTTP_NOT_ACCEPTABLE; + } } } else { $env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; @@ -489,22 +497,16 @@ sub handler { } # ------------------------------------------------------------- This is allowed if ($env{'request.course.id'}) { - my $skiplogging; - if ((!&Apache::loncommon::needs_gci_custom()) && - ($env{'course.'.$env{'request.course.id'}.'.internal.courseowner'} ne $env{'user.name'}.':'.$env{'user.domain'})) { - $skiplogging = 1; - } - unless ($skiplogging) { - &Apache::lonnet::countacc($requrl); - } + &Apache::lonnet::countacc($requrl); $requrl=~/\.(\w+)$/; my $query=$r->args; if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || - ($requrl=~/^\/adm\/.*\/(aboutme|navmaps|smppg|bulletinboard)(\?|$ )/x) || + ($requrl=~/^\/adm\/.*\/(aboutme|smppg|bulletinboard)(\?|$ )/x) || ($requrl=~/^\/adm\/wrapper\//) || ($requrl=~m|^/adm/coursedocs/showdoc/|) || ($requrl=~m|\.problem/smpedit$|) || - ($requrl=~/^\/public\/.*\/syllabus$/)) { + ($requrl=~/^\/public\/.*\/syllabus$/) || + ($requrl=~/^\/adm\/(viewclasslist|navmaps)$/)) { # ------------------------------------- This is serious stuff, get symb and log my $symb; if ($query) { @@ -547,14 +549,10 @@ sub handler { } } $env{'request.symb'}=$symb; - unless ($skiplogging) { - &Apache::lonnet::courseacclog($symb); - } + &Apache::lonnet::courseacclog($symb); } else { # ------------------------------------------------------- This is other content - unless ($skiplogging) { - &Apache::lonnet::courseacclog($requrl); - } + &Apache::lonnet::courseacclog($requrl); } my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};; my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};;