« blib/lib/Lemonldap/NG/Portal/Main/Plugin.pm
↑ Summary
blib/lib/Lemonldap/NG/Portal/Password/Combination.pm »
| 1 | package Lemonldap::NG::Portal::Main::Auth; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 342 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 342 | ▶ | use Mouse; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | |||||||||||||||||||||||||||||
| 6 | 342 | our $VERSION = '2.0.15'; | |||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 342 | extends 'Lemonldap::NG::Portal::Main::Plugin'; | |||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | # PROPERTIES | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 342 | has authnLevel => ( is => 'rw' ); | |||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | 1 | ▶ | sub stop { return 0 } | ||||||||||||||||||||||||||
|
Subroutine
stop: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | # initDisplay is called by the Choice module to prepare the request object. | ||||||||||||||||||||||||||||
| 17 | # Before 2.20, AjaxInitScript and InitCmd were called separately. | ||||||||||||||||||||||||||||
| 18 | 29 | ▶ | sub initDisplay { | ||||||||||||||||||||||||||
|
Subroutine
initDisplay: called CC=7 SCAR=20.2
Pod
undocumented
| |||||||||||||||||||||||||||||
| 19 | 29 | my ( $self, $req ) = @_; | |||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | 29 | ▶ | if ( $self->{AjaxInitScript} ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 22 | $self->logger->debug( 'Append ' . $self->{Name} . ' init/script' ) | ||||||||||||||||||||||||||||
| 23 | 4 | ▶ | if $self->{Name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 24 | 4 | $req->data->{customScript} .= $self->AjaxInitScript; | |||||||||||||||||||||||||||
| 25 | } | ||||||||||||||||||||||||||||
| 26 | 29 | ▶ | if ( $self->can('InitCmd') and my $cmd = $self->InitCmd ) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$self->can("InitCmd") and my $cmd = $self->InitCmd
MC/DC50%1/2
$self->can("InitCmd") and my $cmd = $self->InitCmd
$self->can("InitCmd")
my $cmd = $self->InitCmd
Truth table66%2/3
A and B
A= $self->can("InitCmd")B= my $cmd = $self->InitCmd
| |||||||||||||||||||||||||||||
| 27 | $self->logger->debug( 'Launch ' . $self->{Name} . ' init command' ) | ||||||||||||||||||||||||||||
| 28 | 4 | ▶ | if $self->{Name}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 29 | 4 | my $res = eval( $self->{InitCmd} ); | |||||||||||||||||||||||||||
| 30 | 4 | ▶ | if ($@) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 31 | 0 | die "Error running InitCmd: $@"; | |||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | } | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | 342 | 1; | |||||||||||||||||||||||||||