version 1.146, 2017/08/08 18:12:18
|
version 1.148, 2017/08/08 18:26:34
|
Line 485 sub handler {
|
Line 485 sub handler {
|
my $noprivswitch;
|
my $noprivswitch;
|
#
|
#
|
# su-user's home server and user's home server must have one of:
|
# su-user's home server and user's home server must have one of:
|
# (a) same internet dom
|
# (a) same domain
|
# (b) same primary library server for home server's domain
|
# (b) same primary library server for the two domains
|
# (c) same "internet domain" for primary library server for home server's domain
|
# (c) same "internet domain" for primary library server(s) for home servers' domains
|
#
|
#
|
my $uprim = &Apache::lonnet::domain($sudom,'primary');
|
my $suprim = &Apache::lonnet::domain($sudom,'primary');
|
my $uintdom = &Apache::lonnet::internet_dom($uprim);
|
my $suintdom = &Apache::lonnet::internet_dom($suprim);
|
unless ($sudom eq $form{'udom'}) {
|
unless ($sudom eq $form{'udom'}) {
|
my $suprim = &Apache::lonnet::domain($sudom,'primary');
|
my $uprim = &Apache::lonnet::domain($form{'udom'},'primary');
|
my $suintdom = &Apache::lonnet::internet_dom($suprim);
|
my $uintdom = &Apache::lonnet::internet_dom($uprim);
|
unless ($suprim eq $uprim) {
|
unless ($suprim eq $uprim) {
|
unless ($suintdom eq $uintdom) {
|
unless ($suintdom eq $uintdom) {
|
&Apache::lonnet::logthis('Attempted switch user '
|
&Apache::lonnet::logthis('Attempted switch user '
|
Line 510 sub handler {
|
Line 510 sub handler {
|
#
|
#
|
my $lonhost = $r->dir_config('lonHostID');
|
my $lonhost = $r->dir_config('lonHostID');
|
my $hostintdom = &Apache::lonnet::internet_dom($lonhost);
|
my $hostintdom = &Apache::lonnet::internet_dom($lonhost);
|
if ($hostintdom ne $uintdom) {
|
if ($hostintdom ne $suintdom) {
|
&Apache::lonnet::logthis('Attempted switch user on a '
|
&Apache::lonnet::logthis('Attempted switch user on a '
|
.'server with a different "internet domain".');
|
.'server with a different "internet domain".');
|
} else {
|
} else {
|