Append conf manager test (#2012)

merge-requests/133/head
Christophe Maudoux 6 years ago
parent d935753eaf
commit ea3337574c
  1. 21
      lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Tests.pm
  2. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/JSON.pm
  3. 1
      lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Lib/Notifications/XML.pm

@ -453,7 +453,6 @@ sub tests {
# Warn if 2F dependencies seem missing
sfaDependencies => sub {
my $ok = 0;
foreach (qw(u totp utotp yubikey)) {
$ok ||= $conf->{ $_ . '2fActivation' };
@ -684,8 +683,24 @@ sub tests {
"Notifications enabled WITHOUT persistent session storage" )
if ( $conf->{notification} );
return ( 1,
"BruteForceProtection plugin enabled WITHOUT persistent session storage" )
if ( $conf->{bruteForceProtection} );
"BruteForceProtection plugin enabled WITHOUT persistent session storage"
) if ( $conf->{bruteForceProtection} );
# Return
return 1;
},
# Warn if XML dependencies seem missing
xmlDependencies => sub {
return 1 unless ( $conf->{oldNotifFormat} );
eval "use XML::LibXML";
return ( 1,
"XML::LibXML module is required to enable old format notifications"
) if ($@);
eval "use XML::LibXSLT";
return ( 1,
"XML::LibXSLT module is required to enable old format notifications"
) if ($@);
# Return
return 1;

@ -56,7 +56,6 @@ sub checkForNotifications {
. $self->p->HANDLER->tsv->{jail}->error );
next LOOP;
}
unless ( $condition->( $req, $req->sessionInfo ) ) {
$self->logger->debug(
'Notification condition not authorized');

@ -99,7 +99,6 @@ sub checkForNotifications {
$notif->unbindNode();
next LOOP;
}
unless ( $condition->( $req, $req->sessionInfo ) ) {
$self->logger->debug(
'Notification condition not authorized');

Loading…
Cancel
Save