Little bugs (#595)
This commit is contained in:
parent
8d1c669a3b
commit
33569f8c8c
|
@ -16,7 +16,7 @@ has api => ( is => 'rw', isa => 'Str' );
|
|||
sub init {
|
||||
my ( $self, $args ) = @_;
|
||||
eval { $self->api->init($self) };
|
||||
if ( $@ and not $self->{protection} eq 'none' ) {
|
||||
if ( $@ and not( $self->{protection} and $self->{protection} eq 'none' ) ) {
|
||||
$self->error($@);
|
||||
return 0;
|
||||
}
|
||||
|
@ -28,7 +28,8 @@ sub init {
|
|||
return 0;
|
||||
}
|
||||
$self->portal( $self->api->tsv->{portal}->() );
|
||||
my $rule = $self->{protection} || $self->api->localConfig->{protection} || '';
|
||||
my $rule =
|
||||
$self->{protection} || $self->api->localConfig->{protection} || '';
|
||||
$self->rule(
|
||||
$rule eq 'authenticate' ? 1 : $rule eq 'manager' ? '' : $rule );
|
||||
return 1;
|
||||
|
|
|
@ -11,8 +11,8 @@ our $VERSION = '2.0.0';
|
|||
|
||||
sub init {
|
||||
$_[0]->api('Lemonldap::NG::Handler::PSGI::API');
|
||||
my $tmp = $_[0]->Lemonldap::NG::Common::PSGI::Router::init( $_[1] )
|
||||
and $_[0]->Lemonldap::NG::Handler::PSGI::Base::init( $_[1] );
|
||||
my $tmp = ( $_[0]->Lemonldap::NG::Common::PSGI::Router::init( $_[1] )
|
||||
and $_[0]->Lemonldap::NG::Handler::PSGI::Base::init( $_[1] ) );
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ has forAuthUser => (
|
|||
sub init {
|
||||
my ( $self, $args ) = @_;
|
||||
$args ||= {};
|
||||
return 0 unless ( $self->SUPER::init( { conf => $args } ) );
|
||||
return 0 unless ( $self->SUPER::init($args) );
|
||||
$self->localConfig(
|
||||
{ %{ HANDLER->confAcc->getLocalConf('portal') }, %$args } );
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user