Test if Safe jail is enabled (#2617)
This commit is contained in:
parent
5f687217c7
commit
9b50811f5e
|
@ -1038,11 +1038,19 @@ sub tests {
|
|||
# Warn if Impersonation and proxyAuthServiceImpersonation are simultaneously enabled
|
||||
impersonationProxy => sub {
|
||||
return ( -1,
|
||||
'Impersonation and internal portal Impersonation are simultaneously enabled'
|
||||
'Impersonation and internal portal Impersonation are simultaneously enabled'
|
||||
)
|
||||
if ( $conf->{impersonationRule}
|
||||
and $conf->{proxyAuthServiceImpersonation} );
|
||||
return 1;
|
||||
},
|
||||
|
||||
# CheckDevOps requires Safe jail
|
||||
checkDevOpsWithSafeJail => sub {
|
||||
return ( 0, 'Safe jail must be enabled with CheckDevOps plugin' )
|
||||
if ( $conf->{checkDevOps}
|
||||
and !$conf->{useSafeJail} );
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -51,6 +51,12 @@ sub init {
|
|||
$self->addAuthRoute( checkdevops => 'run', ['POST'] )
|
||||
->addAuthRouteWithRedirect( checkdevops => 'display', ['GET'] );
|
||||
|
||||
unless ( $self->conf->{useSafeJail} ) {
|
||||
$self->logger->warn(
|
||||
'"CheckDevOps" plugin enabled WITHOUT SafeJail');
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user