version 1.1520, 2023/12/23 02:17:39
|
version 1.1521, 2023/12/28 15:57:28
|
Line 2783 sub get_domain_defaults {
|
Line 2783 sub get_domain_defaults {
|
} else { |
} else { |
$domdefaults{'defaultquota'} = $domconfig{'quotas'}; |
$domdefaults{'defaultquota'} = $domconfig{'quotas'}; |
} |
} |
my @usertools = ('aboutme','blog','webdav','portfolio'); |
my @usertools = ('aboutme','blog','webdav','portfolio','portaccess'); |
foreach my $item (@usertools) { |
foreach my $item (@usertools) { |
if (ref($domconfig{'quotas'}{$item}) eq 'HASH') { |
if (ref($domconfig{'quotas'}{$item}) eq 'HASH') { |
$domdefaults{$item} = $domconfig{'quotas'}{$item}; |
$domdefaults{$item} = $domconfig{'quotas'}{$item}; |
Line 7988 sub portfolio_access {
|
Line 7988 sub portfolio_access {
|
} |
} |
|
|
sub get_portfolio_access { |
sub get_portfolio_access { |
my ($udom,$unum,$file_name,$group,$clientip,$access_hash) = @_; |
my ($udom,$unum,$file_name,$group,$clientip,$access_hash,$portaccessref) = @_; |
|
|
if (!ref($access_hash)) { |
if (!ref($access_hash)) { |
my $current_perms = &get_portfile_permissions($udom,$unum); |
my $current_perms = &get_portfile_permissions($udom,$unum); |
Line 7997 sub get_portfolio_access {
|
Line 7997 sub get_portfolio_access {
|
$access_hash = $access_controls{$file_name}; |
$access_hash = $access_controls{$file_name}; |
} |
} |
|
|
|
my $portaccess; |
|
if (ref($portaccess) eq 'SCALAR') { |
|
$portaccess = $$portaccessref; |
|
} else { |
|
$portaccess = &usertools_access($unum,$udom,'portaccess',undef,'tools'); |
|
} |
|
|
my ($public,$guest,@domains,@users,@courses,@groups,@ips); |
my ($public,$guest,@domains,@users,@courses,@groups,@ips); |
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})) { |
my ($num,$scope,$end,$start) = ($key =~ /^([^:]+):([a-z]+)_(\d*)_?(\d*)$/); |
my ($num,$scope,$end,$start) = ($key =~ /^([^:]+):([a-z]+)_(\d*)_?(\d*)$/); |
|
next if (($scope ne 'ip') && ($portaccess == 0)); |
if ($start > $now) { |
if ($start > $now) { |
next; |
next; |
} |
} |