diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm index c448ee4aa..6fd32df33 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/GrantSession.pm @@ -28,8 +28,9 @@ sub init { $hd->substitute( $self->conf->{grantSessionRules}->{$_} ) ); unless ($rule) { my $error = $hd->tsv->{jail}->error || '???'; - $self->error("Bad grantSession rule -> $error"); - return 0; + $self->logger->error("Bad grantSession rule -> $error"); + $self->logger->debug("Skipping GrantSession rule \"$_\""); + next; } $self->rules->{$_} = $rule; } diff --git a/lemonldap-ng-portal/t/61-GrantSession.t b/lemonldap-ng-portal/t/61-GrantSession.t index 657737183..43f49f849 100644 --- a/lemonldap-ng-portal/t/61-GrantSession.t +++ b/lemonldap-ng-portal/t/61-GrantSession.t @@ -20,6 +20,7 @@ my $client = LLNG::Manager::Test->new( { 'Rtyler_Allowed##rule3' => '$uid eq "rtyler"', '##rule2' => '$uid ne "msmith"', '##rule4' => '$uid ne "jdoe"', + '##bad_rule' => '$uid n "jdoe"', } } }