From 7a02fdf8e5d753db441f8d9aa6b274477a693619 Mon Sep 17 00:00:00 2001 From: Maxime Besson Date: Wed, 12 Aug 2020 09:25:23 +0200 Subject: [PATCH] rollback caa346d0755be6f40e0b3710a66c51769e4df0f7 (#2179) No longer needed since #2261 --- .../lib/Lemonldap/NG/Portal/Main/Run.pm | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index 8f8791de2..d21993881 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -180,8 +180,7 @@ sub postAuthenticatedRequest { sub refresh { my ( $self, $req ) = @_; $req->mustRedirect(1); - my %data = %{ $req->userData }; - my $lastAuthLevel = $req->userData->{authenticationLevel}; + my %data = %{ $req->userData }; $self->userLogger->notice( 'Refresh request for ' . $data{ $self->conf->{whatToTrace} } ); $req->user( $data{_user} || $data{ $self->conf->{whatToTrace} } ); @@ -196,11 +195,6 @@ sub refresh { 'getUser', @{ $self->betweenAuthAndData }, 'setSessionInfo', - sub { - $req->sessionInfo->{authenticationLevel} = $lastAuthLevel - ; # Restore previous authentication level (#2179) - return PE_OK; - }, $self->groupsAndMacros, 'setLocalGroups', sub { @@ -1122,8 +1116,7 @@ sub sendJSONresponse { # Handle caching if ( $args{ttl} and $args{ttl} =~ /^\d+$/ ) { - push @{ $res->[1] }, - 'Cache-Control' => 'public, max-age=' . $args{ttl}; + push @{ $res->[1] }, 'Cache-Control' => 'public, max-age=' . $args{ttl}; } else { push @{ $res->[1] },