version 1.26, 2017/02/25 19:56:09
|
version 1.28, 2023/12/28 15:57:28
|
Line 105 sub process_portfolio {
|
Line 105 sub process_portfolio {
|
my ($r,$udom,$unum,$file_name,$group) = @_; |
my ($r,$udom,$unum,$file_name,$group) = @_; |
my $current_perms = &Apache::lonnet::get_portfile_permissions($udom,$unum); |
my $current_perms = &Apache::lonnet::get_portfile_permissions($udom,$unum); |
my %access_controls = &Apache::lonnet::get_access_controls($current_perms,$group,$file_name); |
my %access_controls = &Apache::lonnet::get_access_controls($current_perms,$group,$file_name); |
|
return unless (ref($access_controls{$file_name}) eq 'HASH'); |
my $access = ''; |
my $access = ''; |
my $now = time; |
my $now = time; |
my $clientip = $r->get_remote_host(); |
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
|
my $portaccess = &Apache::lonnet::usertools_access($unum,$udom,'portaccess',undef,'tools'); |
foreach my $key (keys(%{$access_controls{$file_name}})) { |
foreach my $key (keys(%{$access_controls{$file_name}})) { |
my ($num,$scope,$end,$start) = ($key =~ /^([^:]+):([a-z]+)_(\d*)_?(\d*)$/); |
my ($num,$scope,$end,$start) = ($key =~ /^([^:]+):([a-z]+)_(\d*)_?(\d*)$/); |
|
if (!$portaccess) { |
|
next unless ($scope eq 'ip'); |
|
} |
if ($start > $now) { |
if ($start > $now) { |
next; |
next; |
} |
} |