version 1.49, 2009/04/11 21:42:58
|
version 1.51, 2010/09/30 16:42:30
|
Line 126 sub constructaccess {
|
Line 126 sub constructaccess {
|
unless ($blocked{'domcoord.author'} eq 'blocked') { |
unless ($blocked{'domcoord.author'} eq 'blocked') { |
if (grep(/^$ownerdomain$/,@possibledomains)) { |
if (grep(/^$ownerdomain$/,@possibledomains)) { |
if ($setpriv) { |
if ($setpriv) { |
|
my $refresh=$env{'user.refresh.time'}; |
|
if (!$refresh) { |
|
$refresh = $then; |
|
} |
my $now = time; |
my $now = time; |
&Apache::lonnet::check_adhoc_privs($ownerdomain,$ownername, |
&Apache::lonnet::check_adhoc_privs($ownerdomain,$ownername, |
$then,$now,'ca'); |
$then,$refresh,$now,'ca', |
|
'constructaccess'); |
} |
} |
return($ownername,$ownerdomain); |
return($ownername,$ownerdomain); |
} |
} |
Line 174 sub handler {
|
Line 179 sub handler {
|
$env{'request.state'} = "construct"; |
$env{'request.state'} = "construct"; |
$env{'request.filename'} = $r->filename; |
$env{'request.filename'} = $r->filename; |
|
|
unless (&constructaccess($requrl,$r->dir_config('lonDefDomain')),'setpriv') { |
unless (&constructaccess($requrl,$r->dir_config('lonDefDomain'),'setpriv')) { |
$r->log_reason("Unauthorized $requrl", $r->filename); |
$r->log_reason("Unauthorized $requrl", $r->filename); |
return HTTP_NOT_ACCEPTABLE; |
return HTTP_NOT_ACCEPTABLE; |
} |
} |