This commit is contained in:
Xavier Guimard 2016-08-03 07:31:36 +00:00
parent 21d3efcc87
commit fd25a76cbe
4 changed files with 9 additions and 7 deletions

View File

@ -243,7 +243,7 @@ sub checkMaintenanceMode {
# @return True if the user is granted to access to the current URL
sub grant {
my ( $class, $session, $uri, $cond, $vhost ) = @_;
return &{$cond}() if ($cond);
return $cond->($session) if ($cond);
$vhost ||= $class->resolveAlias;
for ( my $i = 0 ; $i < $class->tsv->{locationCount}->{$vhost} ; $i++ ) {

View File

@ -21,10 +21,7 @@ sub display {
$skinfile = 'error';
# Check URL
$self->_sub('controlUrlOrigin');
# Load session content
$self->_sub('controlExistingSession');
$self->controlUrl($req);
%templateParams = (
PORTAL_URL => $self->conf->{portal},

View File

@ -458,7 +458,12 @@ sub _filterHash {
# Check grant function if display is "auto" (this is the default)
delete $apphash->{$key}
unless ( $self->p->HANDLER->grant( $appuri, undef, $vhost ) );
unless (
$self->p->HANDLER->grant(
$req->sessionInfo,
$appuri, undef, $vhost
)
);
next;
}
}

View File

@ -279,7 +279,7 @@ sub setSessionInfo {
$req->{sessionInfo}->{_url} = $req->{urldc};
# Share sessionInfo with underlying handler (needed for safe jail)
$req->userData( $req->{sessionInfo} );
$req->userData( $req->sessionInfo );
# Call UserDB setSessionInfo
return $self->_userDB->setSessionInfo($req);