Remove dead code
This commit is contained in:
parent
8ee7bc8e0b
commit
13120fd1e2
|
@ -5,7 +5,7 @@ use Mouse;
|
|||
use Lemonldap::NG::Common::Conf::Constants;
|
||||
use JSON qw(from_json to_json);
|
||||
|
||||
our $VERSION = '2.0.14';
|
||||
our $VERSION = '2.0.15';
|
||||
|
||||
has sessionTypes => ( is => 'rw' );
|
||||
|
||||
|
@ -45,8 +45,6 @@ sub hAttr {
|
|||
|
||||
sub delSession {
|
||||
my ( $self, $req ) = @_;
|
||||
return $self->sendJSONresponse( $req, { result => 1 } )
|
||||
if ( $self->{demoMode} );
|
||||
my $mod = $self->getMod($req)
|
||||
or return $self->sendError( $req, undef, 400 );
|
||||
my $id = $req->params('sessionId')
|
||||
|
@ -64,8 +62,6 @@ sub delSession {
|
|||
|
||||
sub deleteOIDCConsent {
|
||||
my ( $self, $req ) = @_;
|
||||
return $self->sendJSONresponse( $req, { result => 1 } )
|
||||
if ( $self->{demoMode} );
|
||||
my $mod = $self->getMod($req)
|
||||
or return $self->sendError( $req, undef, 400 );
|
||||
my $id = $req->params('sessionId')
|
||||
|
@ -137,8 +133,6 @@ sub deleteOIDCConsent {
|
|||
|
||||
sub delete2F {
|
||||
my ( $self, $req ) = @_;
|
||||
return $self->sendJSONresponse( $req, { result => 1 } )
|
||||
if ( $self->{demoMode} );
|
||||
my $mod = $self->getMod($req)
|
||||
or return $self->sendError( $req, undef, 400 );
|
||||
my $id = $req->params('sessionId')
|
||||
|
|
|
@ -460,28 +460,23 @@ sub newRawConf {
|
|||
}
|
||||
|
||||
my $res = {};
|
||||
if ( $self->p->{demoMode} ) {
|
||||
$res->{message} = '__demoModeOn__';
|
||||
|
||||
# When uploading a new conf, always force it since cfgNum has a few
|
||||
# chances to be equal to last config cfgNum
|
||||
my $s = $self->confAcc->saveConf( $new, force => 1 );
|
||||
if ( $s > 0 ) {
|
||||
$self->userLogger->notice(
|
||||
'User ' . $self->p->userId($req) . " has stored (raw) conf $s" );
|
||||
$res->{result} = 1;
|
||||
$res->{cfgNum} = $s;
|
||||
}
|
||||
else {
|
||||
# When uploading a new conf, always force it since cfgNum has a few
|
||||
# chances to be equal to last config cfgNum
|
||||
my $s = $self->confAcc->saveConf( $new, force => 1 );
|
||||
if ( $s > 0 ) {
|
||||
$self->userLogger->notice( 'User '
|
||||
. $self->p->userId($req)
|
||||
. " has stored (raw) conf $s" );
|
||||
$res->{result} = 1;
|
||||
$res->{cfgNum} = $s;
|
||||
}
|
||||
else {
|
||||
$self->userLogger->notice(
|
||||
'Raw saving attempt rejected, asking for confirmation to '
|
||||
. $self->p->userId($req) );
|
||||
$res->{result} = 0;
|
||||
$res->{needConfirm} = 1 if ( $s == CONFIG_WAS_CHANGED );
|
||||
$res->{message} .= '__needConfirmation__';
|
||||
}
|
||||
$self->userLogger->notice(
|
||||
'Raw saving attempt rejected, asking for confirmation to '
|
||||
. $self->p->userId($req) );
|
||||
$res->{result} = 0;
|
||||
$res->{needConfirm} = 1 if ( $s == CONFIG_WAS_CHANGED );
|
||||
$res->{message} .= '__needConfirmation__';
|
||||
}
|
||||
return $self->sendJSONresponse( $req, $res );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue