Commit 2099b03b authored by Xavier Guimard's avatar Xavier Guimard

LEMONLDAP::NG : getProtectedURLS becomes getProtectedSites and moves from...

LEMONLDAP::NG : getProtectedURLS becomes getProtectedSites and moves from AuthLA.pm to Portal/SharedConf.pm

parent 89390a7f
......@@ -43,7 +43,7 @@ if( $portal->process() ) {
print $portal->header ;
print "<a href=\"http://$_\"> $_</a><br/>"
foreach ($portal->getProtectedURLs) ;
foreach ($portal->getProtectedSites) ;
} else {
......
......@@ -427,25 +427,6 @@ sub getIdpIDs {
return @tab;
}
#===============================================================================
# getProtectedURLs
#===============================================================================
#
# Returns all protected URLs
#
#===============================================================================
sub getProtectedURLs {
my $self = shift;
my @tab = ();
if ( $self->{locationRules} ) {
push @tab, $_ foreach ( keys %{ $self->{locationRules} } );
}
return @tab;
}
#===============================================================================
#===============================================================================
......@@ -1329,7 +1310,7 @@ FederID project.
# Print protected URLs
print $portal->header ;
print "<a href=\"http://$_\"> $_</a><br/>"
foreach ($portal->getProtectedURLs) ;
foreach ($portal->getProtectedSites) ;
} else {
print $portal->header ;
......
......@@ -150,6 +150,16 @@ sub scanexpr {
return "($cond$result)";
}
# With SharedConf, $locationRules contains a hash table with virtual hosts as
# keys. So we can use it to know all protected virtual hosts.
sub getProtectedSites {
my $self = shift;
my @tab = ();
return ( keys %{ $self->{locationRules} } )
if ( ref $self->{locationRules} );
return ();
}
1;
__END__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment