blib/lib/Lemonldap/NG/Portal/Plugins/History.pm

filter: Statementstmt 68.1% 15 / 22 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 55.5% 20 / 36 CC 5 SCAR 28.4
CC
5
Cov
50%
run
30.0
BEGIN
1.0
BEGIN
1.0
CRAP 17.1
« blib/lib/Lemonldap/NG/Portal/Lib/CrowdSec.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm »
1 package Lemonldap::NG::Portal::Plugins::History;
2  
3 92 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 92 ▶use Mouse;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 92 use Lemonldap::NG::Portal::Main::Constants qw(
6 PE_OK
7 PE_INFO
8 92 ▶);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 92 our $VERSION = '2.0.14';
11  
12 92 extends qw(
13 Lemonldap::NG::Portal::Main::Plugin
14 Lemonldap::NG::Portal::Lib::OtherSessions
15 );
16  
17 # INITIALIZATION
18  
19 92 ▶use constant endAuth => 'run';
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 # RUNNING METHOD
22  
23 sub run {
24 0 ▶ my ( $self, $req ) = @_;
Subroutine run: not called CC=5 SCAR=34.0
Pod documented
25  
26 0 ▶ if ( $req->param('checkLogins') ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($req->param("checkLogins")) 0 0 0
27 0 $self->logger->debug('History asked');
28 $req->info( (
29 $req->sessionInfo->{_loginHistory}->{successLogin}
30 ? $self->p->mkSessionArray( $req,
31 $req->sessionInfo->{_loginHistory}->{successLogin},
32 'lastLogins', 0, 0 )
33 : ""
34 )
35 . ("<hr>")
36 . (
37 $req->sessionInfo->{_loginHistory}->{failedLogin}
38 ? $self->p->mkSessionArray( $req,
39 $req->sessionInfo->{_loginHistory}->{failedLogin},
40 0 ▶ 'lastFailedLogins', 0, 1 )
Branch: 2 branches
BranchTrueFalseTotal
$req->sessionInfo->{'_loginHistory'}{'successLogin'} ? : 0 0 0
$req->sessionInfo->{'_loginHistory'}{'failedLogin'} ? : 0 0 0
41 : ""
42 )
43 );
44 0 ▶ $req->info( $self->loadTemplate( $req, 'noHistory' ) )
Branch: 1 branch
BranchTrueFalseTotal
unless $req->info 0 0 0
45 unless ( $req->info );
46 0 return PE_INFO;
47 }
48 0 return PE_OK;
49 }
50  
51 92 1;
« blib/lib/Lemonldap/NG/Portal/Lib/CrowdSec.pm ↑ Summary blib/lib/Lemonldap/NG/Portal/Plugins/SOAPServer.pm »