BUNDBITBK-4445
This commit is contained in:
parent
5f09c70172
commit
26d7406d47
|
@ -39,21 +39,26 @@ if (Arrays.stream(response.getActualRoles()).filter( r -> r.matches('^.*AGOV-Loi
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
// 1b) check if user has a credential
|
||||
// 1a) check if user has a credential
|
||||
if ( recoveryCredential != null ) {
|
||||
LOG.debug("Account '${user}' has an active recovery code, no need to create new code")
|
||||
response.setResult('done')
|
||||
return
|
||||
}
|
||||
|
||||
// 1c) check if a recovery is ongoing (nothing to do)
|
||||
// 1b) check if a recovery is ongoing (nothing to do)
|
||||
if (Arrays.stream(response.getActualRoles()).filter( r -> r.contains('AGOV-AccountStatus.recovery')).findAny().isPresent()) {
|
||||
LOG.debug("Account '${user}' is in recovery, no need to create new code")
|
||||
response.setResult('done')
|
||||
return
|
||||
}
|
||||
|
||||
// 1c) don't do it for mobile phones (BUNDBITBK-4445)
|
||||
if (userAgent =~ /(iPhone|Android)/ ) {
|
||||
LOG.debug("User '${user}' used a mobile phone, recovery code creation skipped")
|
||||
response.setResult('done')
|
||||
return
|
||||
}
|
||||
|
||||
// 2) set cookie for recoveryCode
|
||||
if (outargs.containsKey('out.JWTToken')) {
|
||||
|
|
Loading…
Reference in New Issue