diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/AdaptativeAuthenticationLevel.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/AdaptativeAuthenticationLevel.pm index f58deb094..0a2b8bee7 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/AdaptativeAuthenticationLevel.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/AdaptativeAuthenticationLevel.pm @@ -44,14 +44,7 @@ sub adaptAuthenticationLevel { my $updatedAuthenticationLevel = $authenticationLevel; - sub sortByComment { - - my $A = ( $a =~ /^.*?##(.*)$/ )[0]; - my $B = ( $b =~ /^.*?##(.*)$/ )[0]; - return !$A ? 1 : !$B ? -1 : $A cmp $B; - } - - foreach ( sort sortByComment keys %{ $self->rules } ) { + foreach ( keys %{ $self->rules } ) { my $rule = $_; $self->logger->debug( "Check adaptativeAuthenticationLevelRules -> $rule");