version 1.183, 2020/10/20 01:38:12
|
version 1.185, 2020/12/22 22:23:37
|
Line 386 sub sso_login {
|
Line 386 sub sso_login {
|
} else { |
} else { |
# need to login them in, so generate the need data that |
# need to login them in, so generate the need data that |
# migrate expects to do login |
# migrate expects to do login |
my $ip = $r->get_remote_host(); |
my $ip = &Apache::lonnet::get_requestor_ip($r); |
my %info=('ip' => $ip, |
my %info=('ip' => $ip, |
'domain' => $domain, |
'domain' => $domain, |
'username' => $user, |
'username' => $user, |
Line 616 sub handler {
|
Line 616 sub handler {
|
} |
} |
# ---------------------------------------------------------------- Check access |
# ---------------------------------------------------------------- Check access |
my $now = time; |
my $now = time; |
my $check_symb; |
my ($check_symb,$check_access); |
if ($requrl !~ m{^/(?:adm|public|(?:prt|zip)spool)/} |
if ($requrl !~ m{^/(?:adm|public|(?:prt|zip)spool)/} |
|| $requrl =~ /^\/adm\/.*\/(smppg|bulletinboard)(\?|$ )/x) { |
|| $requrl =~ /^\/adm\/.*\/(smppg|bulletinboard)(\?|$ )/x) { |
my ($access,$poss_symb); |
$check_access = 1; |
if (($env{'request.course.id'}) && (!$suppext)) { |
} |
$requrl=~/\.(\w+)$/; |
if (($env{'request.course.id'}) && (!$suppext)) { |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
$requrl=~/\.(\w+)$/; |
($requrl=~/^\/adm\/.*\/(aboutme|smppg|bulletinboard)(\?|$ )/x) || |
if ((&Apache::loncommon::fileembstyle($1) eq 'ssi') || |
($requrl=~/^\/adm\/wrapper\//) || |
($requrl=~/^\/adm\/.*\/(aboutme|smppg|bulletinboard)(\?|$ )/x) || |
($requrl=~m|^/adm/coursedocs/showdoc/|) || |
($requrl=~/^\/adm\/wrapper\//) || |
($requrl=~m|\.problem/smpedit$|) || |
($requrl=~m|^/adm/coursedocs/showdoc/|) || |
($requrl=~/^\/public\/.*\/syllabus$/) || |
($requrl=~m|\.problem/smpedit$|) || |
($requrl=~/^\/adm\/(viewclasslist|navmaps)$/) || |
($requrl=~/^\/public\/.*\/syllabus$/) || |
($requrl=~/^\/adm\/.*\/aboutme\/portfolio(\?|$)/) || |
($requrl=~/^\/adm\/(viewclasslist|navmaps)$/) || |
($requrl=~m{^/adm/$cdom/$cnum/\d+/ext\.tool$})) { |
($requrl=~/^\/adm\/.*\/aboutme\/portfolio(\?|$)/) || |
$check_symb = 1; |
($requrl=~m{^/adm/$cdom/$cnum/\d+/ext\.tool$})) { |
} |
$check_symb = 1; |
} |
} |
|
} |
|
if ($check_access) { |
|
my ($access,$poss_symb); |
if ($check_symb) { |
if ($check_symb) { |
if ($env{'form.symb'}) { |
if ($env{'form.symb'}) { |
$poss_symb=&Apache::lonnet::symbclean($env{'form.symb'}); |
$poss_symb=&Apache::lonnet::symbclean($env{'form.symb'}); |
Line 718 sub handler {
|
Line 721 sub handler {
|
} |
} |
} |
} |
} elsif (($handle =~ /^publicuser_\d+$/) && (&Apache::lonnet::is_portfolio_url($requrl))) { |
} elsif (($handle =~ /^publicuser_\d+$/) && (&Apache::lonnet::is_portfolio_url($requrl))) { |
my $clientip = $r->get_remote_host(); |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
if (&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip) ne 'F') { |
if (&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip) ne 'F') { |
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
$env{'user.error.msg'}="$requrl:bre:1:1:Access Denied"; |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
Line 908 sub handler {
|
Line 911 sub handler {
|
} |
} |
# ------------------------------------ See if this is a viewable portfolio file |
# ------------------------------------ See if this is a viewable portfolio file |
if (&Apache::lonnet::is_portfolio_url($requrl)) { |
if (&Apache::lonnet::is_portfolio_url($requrl)) { |
my $clientip = $r->get_remote_host(); |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
my $access=&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip); |
my $access=&Apache::lonnet::allowed('bre',$requrl,undef,undef,$clientip); |
if ($access eq 'A') { |
if ($access eq 'A') { |
&Apache::restrictedaccess::setup_handler($r); |
&Apache::restrictedaccess::setup_handler($r); |