version 1.1521, 2023/12/28 15:57:28
|
version 1.1523, 2024/02/24 23:41:44
|
Line 2975 sub get_domain_defaults {
|
Line 2975 sub get_domain_defaults {
|
$domdefaults{'ltiprivhosts'} = $domconfig{'ltisec'}{'private'}{'keys'}; |
$domdefaults{'ltiprivhosts'} = $domconfig{'ltisec'}{'private'}{'keys'}; |
} |
} |
} |
} |
|
if (ref($domconfig{'ltisec'}{'suggested'}) eq 'HASH') { |
|
my %suggestions = %{$domconfig{'ltisec'}{'suggested'}}; |
|
foreach my $item (keys(%{$domconfig{'ltisec'}{'suggested'}})) { |
|
unless (ref($domconfig{'ltisec'}{'suggested'}{$item}) eq 'HASH') { |
|
delete($suggestions{$item}); |
|
} |
|
} |
|
if (keys(%suggestions)) { |
|
$domdefaults{'linkprotsuggested'} = \%suggestions; |
|
} |
|
} |
} |
} |
if (ref($domconfig{'toolsec'}) eq 'HASH') { |
if (ref($domconfig{'toolsec'}) eq 'HASH') { |
if (ref($domconfig{'toolsec'}{'encrypt'}) eq 'HASH') { |
if (ref($domconfig{'toolsec'}{'encrypt'}) eq 'HASH') { |
Line 8004 sub get_portfolio_access {
|
Line 8015 sub get_portfolio_access {
|
$portaccess = &usertools_access($unum,$udom,'portaccess',undef,'tools'); |
$portaccess = &usertools_access($unum,$udom,'portaccess',undef,'tools'); |
} |
} |
|
|
my ($public,$guest,@domains,@users,@courses,@groups,@ips); |
my ($public,$guest,@domains,@users,@courses,@groups,@ips,@userips); |
my $now = time; |
my $now = time; |
if (ref($access_hash) eq 'HASH') { |
if (ref($access_hash) eq 'HASH') { |
foreach my $key (keys(%{$access_hash})) { |
foreach my $key (keys(%{$access_hash})) { |
Line 8031 sub get_portfolio_access {
|
Line 8042 sub get_portfolio_access {
|
push(@groups,$key); |
push(@groups,$key); |
} elsif ($scope eq 'ip') { |
} elsif ($scope eq 'ip') { |
push(@ips,$key); |
push(@ips,$key); |
|
} elsif ($scope eq 'userip') { |
|
push(@userips,$key); |
} |
} |
} |
} |
if ($public) { |
if ($public) { |
Line 8045 sub get_portfolio_access {
|
Line 8058 sub get_portfolio_access {
|
} |
} |
} |
} |
} |
} |
|
if ($allowed) { |
|
return 'ok'; |
|
} |
|
} elsif (@userips > 0) { |
|
my $allowed; |
|
foreach my $useripkey (@userips) { |
|
if (ref($access_hash->{$useripkey}{'ip'}) eq 'ARRAY') { |
|
if (&Apache::loncommon::check_ip_acc(join(',',@{$access_hash->{$useripkey}{'ip'}}),$clientip)) { |
|
$allowed = 1; |
|
last; |
|
} |
|
} |
|
} |
if ($allowed) { |
if ($allowed) { |
return 'ok'; |
return 'ok'; |
} |
} |