From 5d5eda9799b553a1b972dc58572f53451d775ce7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20OUDOT?= Date: Thu, 18 Jun 2020 18:39:53 +0200 Subject: [PATCH] Adapt user log in CAS issuer (#2244) --- .../lib/Lemonldap/NG/Portal/Issuer/CAS.pm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm index 460f31443..5785862d0 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Issuer/CAS.pm @@ -14,7 +14,7 @@ use Lemonldap::NG::Portal::Main::Constants qw( PE_SENDRESPONSE ); -our $VERSION = '2.0.8'; +our $VERSION = '2.0.9'; extends 'Lemonldap::NG::Portal::Main::Issuer', 'Lemonldap::NG::Portal::Lib::CAS'; @@ -195,7 +195,7 @@ sub run { else { $self->userLogger->warn( 'User ' . $req->sessionInfo->{ $self->conf->{whatToTrace} } - . " is not authorized to access to $service" ); + . " is not authorized to access to $app" ); if ( $casAccessControlPolicy =~ /^(error)$/i ) { $self->logger->debug( @@ -213,9 +213,16 @@ sub run { } } - $self->userLogger->notice( 'User ' - . $req->sessionInfo->{ $self->conf->{whatToTrace} } - . " is authorized to access to $service" ); + if ($app) { + $self->userLogger->notice( 'User ' + . $req->sessionInfo->{ $self->conf->{whatToTrace} } + . " is authorized to access to $app" ); + } + else { + $self->userLogger->notice( 'User ' + . $req->sessionInfo->{ $self->conf->{whatToTrace} } + . " is redirected to $service" ); + } unless ($casServiceTicket) {