version 1.1041, 2009/11/05 16:04:22
|
version 1.1042, 2009/11/06 01:49:10
|
Line 5065 sub allowed {
|
Line 5065 sub allowed {
|
if ($uri =~ m{^([^/]+)/?$}) { |
if ($uri =~ m{^([^/]+)/?$}) { |
my $adom = $1; |
my $adom = $1; |
foreach my $key (keys(%env)) { |
foreach my $key (keys(%env)) { |
if ($key =~ m{^user\.role\.ca/\Q$adom\E}) { |
if ($key =~ m{^user\.role\.(ca|aa)/\Q$adom\E}) { |
my ($start,$end) = split('.',$env{$key}); |
my ($start,$end) = split('.',$env{$key}); |
if (($now >= $start) && (!$end || $end < $now)) { |
if (($now >= $start) && (!$end || $end < $now)) { |
$ownaccess = 1; |
$ownaccess = 1; |
Line 5076 sub allowed {
|
Line 5076 sub allowed {
|
} elsif ($uri =~ m{^([^/]+)/([^/]+)/?}) { |
} elsif ($uri =~ m{^([^/]+)/([^/]+)/?}) { |
my $adom = $1; |
my $adom = $1; |
my $aname = $2; |
my $aname = $2; |
if ($env{"user.role.ca./$adom/$aname"}) { |
foreach my $role ('ca','aa') { |
my ($start,$end) = |
if ($env{"user.role.$role./$adom/$aname"}) { |
split('.',$env{"user.role.ca./$adom/$aname"}); |
my ($start,$end) = |
if (($now >= $start) && (!$end || $end < $now)) { |
split('.',$env{"user.role.$role./$adom/$aname"}); |
$ownaccess = 1; |
if (($now >= $start) && (!$end || $end < $now)) { |
|
$ownaccess = 1; |
|
last; |
|
} |
} |
} |
} |
} |
} |
} |