Commit 72b42a51 authored by Christophe Maudoux's avatar Christophe Maudoux

Append reset password retries number parameter (#1508)

parent 3980070a
......@@ -169,6 +169,7 @@ sub defaultValues {
'pamAuthnLevel' => 2,
'pamService' => 'login',
'passwordDB' => 'Demo',
'passwordResetAllowedRetries' => 3,
'portal' => 'http://auth.example.com/',
'portalAntiFrame' => 1,
'portalCheckLogins' => 1,
......
......@@ -2113,6 +2113,10 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
],
'type' => 'select'
},
'passwordResetAllowedRetries' => {
'default' => 3,
'type' => 'int'
},
'persistentStorage' => {
'type' => 'PerlModule'
},
......
......@@ -786,6 +786,11 @@ sub attributes {
type => 'bool',
documentation => 'Display reset password button in portal',
},
passwordResetAllowedRetries => {
default => 3,
type => 'int',
documentation => 'Maximum number of retries to reset password',
},
portalDisplayOidcConsents => {
type => 'boolOrExpr',
default => '$_oidcConnectedRP',
......
......@@ -67,6 +67,7 @@ sub tree {
nodes => [
'portalCheckLogins',
'portalDisplayResetPassword',
'passwordResetAllowedRetries',
'portalDisplayRegister'
]
},
......
......@@ -567,6 +567,7 @@
"password":"كلمة المرور",
"passwordDB":"وحدة كلمة المرور",
"passwordManagement":"إدارة كلمة المرور",
"passwordResetAllowedRetries":"Max reset password retries",
"persistent":"الثابتة",
"persistentSessions":"الجلسات الثابتة",
"persistentStorage":"أباتشي :: وحدة الجلسة",
......
......@@ -567,6 +567,7 @@
"password":"Password",
"passwordDB":"Password module",
"passwordManagement":"Password management",
"passwordResetAllowedRetries":"Max reset password retries",
"persistent":"Persistent",
"persistentSessions":"Persistent sessions",
"persistentStorage":"Apache::Session module",
......
......@@ -567,6 +567,7 @@
"password":"Mot-de-passe",
"passwordDB":"Module de mot de passe",
"passwordManagement":"Gestion des mots de passe",
"passwordResetAllowedRetries":"Nombre d'essais pour réinitialiser le mot de passe",
"persistent":"Persistantes",
"persistentSessions":"Sessions persistantes",
"persistentStorage":"Module Apache::Session",
......
......@@ -567,6 +567,7 @@
"password":"Mật khẩu",
"passwordDB":"Mô-đun mật khẩu",
"passwordManagement":"Quản lý mật khẩu",
"passwordResetAllowedRetries":"Max reset password retries",
"persistent":"Duy trì",
"persistentSessions":"Duy trì phiên",
"persistentStorage":"Tập lệnh Apache :: Session",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -360,7 +360,7 @@ sub _reset {
# User has a valid mailToken, allow to change password
# A token is required
$self->ott->setToken( $req, { %{ $req->sessionInfo }, pwdAllowed => 3 } );
$self->ott->setToken( $req, { %{ $req->sessionInfo }, pwdAllowed => $self->conf->{passwordResetAllowedRetries} } );
return PE_PASSWORDFIRSTACCESS if ( $req->method eq 'GET' );
return PE_PASSWORDFORMEMPTY;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment