new configuration version
This commit is contained in:
parent
1c557cb814
commit
2c4eb507a9
|
@ -45,7 +45,7 @@ spec:
|
||||||
podDisruptionBudget:
|
podDisruptionBudget:
|
||||||
maxUnavailable: "50%"
|
maxUnavailable: "50%"
|
||||||
git:
|
git:
|
||||||
tag: "r-2dd29e7a0f66498b8cc9936290c12596ecbcaf37"
|
tag: "r-dfa6445c338f6998342e61861b6fbeac0779c87b"
|
||||||
dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth"
|
dir: "DEFAULT-ADN-AGOV-PROJECT/DEFAULT-ADN-AGOV-INV/auth"
|
||||||
credentials: "git-credentials"
|
credentials: "git-credentials"
|
||||||
keystores:
|
keystores:
|
||||||
|
|
|
@ -38,13 +38,28 @@ if (mobile) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def agovSkipAskingMobileCookieValue = 'missing'
|
||||||
|
|
||||||
|
if (getHeader('cookie') != null) {
|
||||||
|
def cookies = getHeader('cookie')
|
||||||
|
if (cookies.matches('^.*agovSkipAskingMobile=([^;]+).*$')) {
|
||||||
|
agovSkipAskingMobileCookieValue = cookies.replaceAll('^.*agovSkipAskingMobile=([^;]+).*$', '$1')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (agovSkipAskingMobileCookieValue == 'true') {
|
||||||
|
// Don't aske the user again...
|
||||||
|
LOG.info("Event='SKIPPEDMOBILENUMBER', Requester='${requester}', RequestId='${requestId}', User=${user}, SourceIp=${sourceIp}, UserAgent='${userAgent}'")
|
||||||
|
response.setResult('done')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!inargs['submit'] && (!inargs['mobile'] || !inargs['mobile'].isEmpty()) && inargs['language'] && inargs['language'] != session['ch.nevis.session.user.language']) {
|
if (!inargs['submit'] && (!inargs['mobile'] || !inargs['mobile'].isEmpty()) && inargs['language'] && inargs['language'] != session['ch.nevis.session.user.language']) {
|
||||||
// language switch, nothing else to do, just display again the GUI
|
// language switch, nothing else to do, just display again the GUI
|
||||||
response.setStatus(AuthResponse.AUTH_CONTINUE)
|
response.setStatus(AuthResponse.AUTH_CONTINUE)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO/haburger/2024-11-24: check/adapt value of skip checkbox
|
|
||||||
if (inargs['submit'] && (!inargs['mobile'] || inargs['mobile'].isEmpty()) && inargs['skip'] && inargs['skip'] == 'true') {
|
if (inargs['submit'] && (!inargs['mobile'] || inargs['mobile'].isEmpty()) && inargs['skip'] && inargs['skip'] == 'true') {
|
||||||
// no mobile, and user wants to skip it
|
// no mobile, and user wants to skip it
|
||||||
|
|
||||||
|
@ -59,23 +74,15 @@ if (inargs['submit'] && (!inargs['mobile'] || inargs['mobile'].isEmpty()) && ina
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
def agovSkipAskingMobileCookie = 'missing'
|
|
||||||
|
|
||||||
if (getHeader('cookie') != null) {
|
|
||||||
def cookies = getHeader('cookie')
|
|
||||||
if (cookies.matches('^.*agovSkipAskingMobile=([^;]+).*$')) {
|
|
||||||
agovSkipAskingMobileCookie = cookies.replaceAll('^.*agovSkipAskingMobile=([^;]+).*$', '$1')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (agovSkipAskingMobileCookie == 'true') {
|
|
||||||
// Don't aske the user again...
|
|
||||||
LOG.info("Event='SKIPPEDMOBILENUMBER', Requester='${requester}', RequestId='${requestId}', User=${user}, SourceIp=${sourceIp}, UserAgent='${userAgent}'")
|
|
||||||
response.setResult('done')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (inargs['submit'] && inargs['mobile'] && !inargs['mobile'].isEmpty()) {
|
if (inargs['submit'] && inargs['mobile'] && !inargs['mobile'].isEmpty()) {
|
||||||
|
// IMPORTANT/haburger/2024-DEC-09: the pattern must be the same as ch.adnovum.agov.common.util.InputPatterns.PHONE_NUMBER_PATTERN
|
||||||
|
if (!inargs['mobile'].replaceAll('\\s', '').matches('^(?:\\+[0-9]+)?$')) {
|
||||||
|
LOG.warn("Event='MOBILEFAILED', Requester='${requester}', RequestId='${requestId}', User=${user}, SourceIp=${sourceIp}, UserAgent='${userAgent}', reason='User provided invalid number (${inargs['mobile']})'")
|
||||||
|
response.setResult('done')
|
||||||
|
return
|
||||||
|
}
|
||||||
String result
|
String result
|
||||||
|
|
||||||
def patchBdy = "{\"contacts\":{\"mobile\":\"${inargs['mobile']?.trim()}\"},\"modificationComment\":\"added mobile number from user during request ${requestId}\"}"
|
def patchBdy = "{\"contacts\":{\"mobile\":\"${inargs['mobile']?.trim()}\"},\"modificationComment\":\"added mobile number from user during request ${requestId}\"}"
|
||||||
|
|
Loading…
Reference in New Issue