Use strict & Typo

This commit is contained in:
Christophe Maudoux 2021-01-23 18:57:24 +01:00
parent 7d232b43fd
commit 5d56a88ff3
8 changed files with 21 additions and 20 deletions

View File

@ -60,7 +60,8 @@ by calling ``date(1)``
::
For example: date(1) lt '19551105080000'
For example: date(1) lt '19551018080000'
checkLogonHours
~~~~~~~~~~~~~~~
@ -102,7 +103,6 @@ If you use the binary value (Active Directory), use this:
::
All e
checkLogonHours($ssoLogonHours, 'octetstring')
You can also configure jetlag (if all of your users use the same
@ -129,6 +129,7 @@ rejected. You can allow these users instead of reject them:
checkLogonHours($ssoLogonHours, '', '', '1')
checkDate
~~~~~~~~~
@ -156,10 +157,10 @@ Simple usage example:
checkDate($ssoStartDate, $ssoEndDate)
basic
~~~~~
.. attention::
This function is not compliant with
@ -181,6 +182,7 @@ Simple usage example:
basic($uid,$_password)
unicode2iso
~~~~~~~~~~~

View File

@ -1,6 +1,6 @@
package Lemonldap::NG::Common::Conf::AccessLib;
use 5.10.0;
use strict;
use utf8;
use Mouse;
@ -11,7 +11,7 @@ has 'configStorage' => ( is => 'rw', isa => 'HashRef', default => sub { {} } );
has 'currentConf' => ( is => 'rw', required => 1, default => sub { {} } );
has 'protection' => ( is => 'rw', isa => 'Str', default => 'manager' );
our $VERSION = '2.0.0';
our $VERSION = '2.0.11';
## @method Lemonldap::NG::Common::Conf confAcc()
# Configuration access object

View File

@ -11,9 +11,7 @@ use MIME::Base64;
use Lemonldap::NG::Common::IPv6;
use JSON::XS;
#use AutoLoader qw(AUTOLOAD);
our $VERSION = '2.0.10';
our $VERSION = '2.0.11';
# Set here all the names of functions that must be available in Safe objects.
# Not that only functions, not methods, can be written here
@ -195,7 +193,6 @@ sub iso2unicode {
# @return int Number of values that match
sub groupMatch {
my ( $groups, $attribute, $value ) = @_;
my $match = 0;
foreach my $group ( keys %$groups ) {
@ -208,6 +205,7 @@ sub groupMatch {
$match++ if ( $groups->{$group}->{$attribute} =~ /$value/ );
}
}
return $match;
}
@ -215,6 +213,7 @@ sub isInNet6 {
my ( $ip, $net ) = @_;
$net =~ s#/(\d+)##;
my $bits = $1;
return net6( $ip, $bits ) eq net6( $net, $bits ) ? 1 : 0;
}
@ -229,21 +228,20 @@ my $json = JSON::XS->new;
sub has2f {
my ( $session, $type ) = @_;
return 0 unless ( $session->{_2fDevices} );
return 0 unless $session->{_2fDevices};
my $_2fDevices = eval { $json->decode( $session->{_2fDevices} ); };
return 0 if ( $@ or ref($_2fDevices) ne "ARRAY" );
my $length = scalar @{$_2fDevices};
# Empty array
return 0 unless $length;
return 0 unless scalar @{$_2fDevices};
# Array has one value and we did not specify a type, succeed
if ($type) {
my @found = grep { lc( $_->{type} ) eq lc($type) } @{$_2fDevices};
return ( @found ? 1 : 0 );
return @found ? 1 : 0;
}
return 1;
}

View File

@ -1,11 +1,11 @@
package Lemonldap::NG::Handler::Lib::PSGI;
#use 5.10.0;
use strict;
use Mouse;
#use Lemonldap::NG::Handler::Main qw(:jailSharedVars);
our $VERSION = '2.0.10';
our $VERSION = '2.0.11';
has protection => ( is => 'rw', isa => 'Str' );
has rule => ( is => 'rw', isa => 'Str' );

View File

@ -1,7 +1,6 @@
package Lemonldap::NG::Handler::Main::Jail;
use strict;
use Safe;
use Lemonldap::NG::Common::Safelib; #link protected safe Safe object
@ -27,7 +26,7 @@ has multiValuesSeparator => ( is => 'rw', isa => 'Maybe[Str]' );
has jail => ( is => 'rw' );
has error => ( is => 'rw' );
our $VERSION = '2.0.8';
our $VERSION = '2.0.11';
our @builtCustomFunctions;
## @imethod protected build_jail()

View File

@ -1,13 +1,13 @@
package Lemonldap::NG::Handler::PSGI::Router;
use 5.10.0;
use strict;
use Mouse;
require Lemonldap::NG::Handler::PSGI::Main;
extends 'Lemonldap::NG::Handler::Lib::PSGI',
'Lemonldap::NG::Common::PSGI::Router';
our $VERSION = '2.0.3';
our $VERSION = '2.0.11';
sub init {
$_[0]->api('Lemonldap::NG::Handler::PSGI::Main');

View File

@ -1,5 +1,6 @@
package Lemonldap::NG::Manager::Cli::Lib;
use strict;
use Mouse;
use Lemonldap::NG::Manager;

View File

@ -1,5 +1,6 @@
package Lemonldap::NG::Portal::Lib::OverConf;
use strict;
use Mouse::Role;
# To avoid "tied" destroy, tied configurations are kept here