setSecurity method for Combination (#2009)

This commit is contained in:
Clément OUDOT 2019-12-13 11:12:26 +01:00
parent 823c9e9fe1
commit c2c11342ac

View File

@ -6,7 +6,7 @@ use Lemonldap::NG::Common::Combination::Parser;
use Lemonldap::NG::Portal::Main::Constants qw(PE_OK PE_ERROR PE_FIRSTACCESS);
use Scalar::Util 'weaken';
our $VERSION = '2.0.6';
our $VERSION = '2.0.7';
# TODO: See Lib::Wrapper
extends 'Lemonldap::NG::Portal::Main::Auth';
@ -152,16 +152,17 @@ sub authForce {
return 0;
}
#sub setSecurity {
# my $self = shift;
# my ($req) = @_;
# $self->getStack( $req, 'extractFormInfo' ) or return PE_ERROR;
# $req->userData->{_combinationTry} ||= 0;
# eval {
# $req->data->{combinationStack}->[ $req->userData->{_combinationTry} ]
# ->[0]->( 'setSecurity', @_ );
# };
#}
sub setSecurity {
my $self = shift;
my ($req) = @_;
$self->getStack( $req, 'extractFormInfo' ) or return;
eval {
$req->data->{combinationStack}
->[ $req->data->{dataKeep}->{combinationTry} ]->[0]
->( 'setSecurity', @_ );
};
$self->logger->debug($@) if ($@);
}
## UserDB steps
###############