version 1.26, 2010/07/17 20:02:02
|
version 1.27, 2010/07/20 02:42:33
|
Line 96 sub handler {
|
Line 96 sub handler {
|
} |
} |
|
|
my $canhost = 1; |
my $canhost = 1; |
my @machinedoms = &Apache::lonnet::machine_domains($switch_to); |
my $uprimary_id = &Apache::lonnet::domain($env{'user.domain'},'primary'); |
unless (grep(/^\Q$env{'user.domain'}\E/,@machinedoms)) { |
my $uint_dom = &Apache::lonnet::internet_dom($uprimary_id); |
my $machinedom = &Apache::lonnet::host_domain($env{'form.otherserver'}); |
my @intdoms = &Apache::lonnet::get_internet_names($env{'form.otherserver'}); |
my %defdomdefaults = &Apache::lonnet::get_domain_defaults($machinedom); |
unless ($uint_dom ne '' && grep(/^\Q$uint_dom\E$/,@intdoms)) { |
|
my $serverhomeID = &Apache::lonnet::get_server_homeID($switch_to); |
|
my $serverhomedom = &Apache::lonnet::host_domain($serverhomeID); |
|
my %defdomdefaults = &Apache::lonnet::get_domain_defaults($serverhomedom); |
my %udomdefaults = &Apache::lonnet::get_domain_defaults($env{'user.domain'}); |
my %udomdefaults = &Apache::lonnet::get_domain_defaults($env{'user.domain'}); |
my $remoterev = &Apache::lonnet::get_server_loncaparev($env{'user.domain'},$env{'form.otherserver'}); |
my $remoterev = &Apache::lonnet::get_server_loncaparev($env{'user.domain'},$env{'form.otherserver'}); |
$canhost = &Apache::lonnet::can_host_session($env{'user.domain'},$machinedom, |
$canhost = |
$remoterev,$udomdefaults{'remotesessions'}, |
&Apache::lonnet::can_host_session($env{'user.domain'}, |
$defdomdefaults{'hostedsessions'}); |
$env{'form.otherserver'}, |
|
$remoterev, |
|
$udomdefaults{'remotesessions'}, |
|
$defdomdefaults{'hostedsessions'}); |
} |
} |
|
|
unless ($canhost) { return FORBIDDEN; } |
unless ($canhost) { return FORBIDDEN; } |