Commit 72b42a51 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛
Browse files

Append reset password retries number parameter (#1508)

parent 3980070a
...@@ -169,6 +169,7 @@ sub defaultValues { ...@@ -169,6 +169,7 @@ sub defaultValues {
'pamAuthnLevel' => 2, 'pamAuthnLevel' => 2,
'pamService' => 'login', 'pamService' => 'login',
'passwordDB' => 'Demo', 'passwordDB' => 'Demo',
'passwordResetAllowedRetries' => 3,
'portal' => 'http://auth.example.com/', 'portal' => 'http://auth.example.com/',
'portalAntiFrame' => 1, 'portalAntiFrame' => 1,
'portalCheckLogins' => 1, 'portalCheckLogins' => 1,
......
...@@ -2113,6 +2113,10 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][ ...@@ -2113,6 +2113,10 @@ qr/^(?:\*\.)?(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][
], ],
'type' => 'select' 'type' => 'select'
}, },
'passwordResetAllowedRetries' => {
'default' => 3,
'type' => 'int'
},
'persistentStorage' => { 'persistentStorage' => {
'type' => 'PerlModule' 'type' => 'PerlModule'
}, },
......
...@@ -786,6 +786,11 @@ sub attributes { ...@@ -786,6 +786,11 @@ sub attributes {
type => 'bool', type => 'bool',
documentation => 'Display reset password button in portal', documentation => 'Display reset password button in portal',
}, },
passwordResetAllowedRetries => {
default => 3,
type => 'int',
documentation => 'Maximum number of retries to reset password',
},
portalDisplayOidcConsents => { portalDisplayOidcConsents => {
type => 'boolOrExpr', type => 'boolOrExpr',
default => '$_oidcConnectedRP', default => '$_oidcConnectedRP',
......
...@@ -67,6 +67,7 @@ sub tree { ...@@ -67,6 +67,7 @@ sub tree {
nodes => [ nodes => [
'portalCheckLogins', 'portalCheckLogins',
'portalDisplayResetPassword', 'portalDisplayResetPassword',
'passwordResetAllowedRetries',
'portalDisplayRegister' 'portalDisplayRegister'
] ]
}, },
......
...@@ -567,6 +567,7 @@ ...@@ -567,6 +567,7 @@
"password":"كلمة المرور", "password":"كلمة المرور",
"passwordDB":"وحدة كلمة المرور", "passwordDB":"وحدة كلمة المرور",
"passwordManagement":"إدارة كلمة المرور", "passwordManagement":"إدارة كلمة المرور",
"passwordResetAllowedRetries":"Max reset password retries",
"persistent":"الثابتة", "persistent":"الثابتة",
"persistentSessions":"الجلسات الثابتة", "persistentSessions":"الجلسات الثابتة",
"persistentStorage":"أباتشي :: وحدة الجلسة", "persistentStorage":"أباتشي :: وحدة الجلسة",
......
...@@ -567,6 +567,7 @@ ...@@ -567,6 +567,7 @@
"password":"Password", "password":"Password",
"passwordDB":"Password module", "passwordDB":"Password module",
"passwordManagement":"Password management", "passwordManagement":"Password management",
"passwordResetAllowedRetries":"Max reset password retries",
"persistent":"Persistent", "persistent":"Persistent",
"persistentSessions":"Persistent sessions", "persistentSessions":"Persistent sessions",
"persistentStorage":"Apache::Session module", "persistentStorage":"Apache::Session module",
......
...@@ -567,6 +567,7 @@ ...@@ -567,6 +567,7 @@
"password":"Mot-de-passe", "password":"Mot-de-passe",
"passwordDB":"Module de mot de passe", "passwordDB":"Module de mot de passe",
"passwordManagement":"Gestion des mots de passe", "passwordManagement":"Gestion des mots de passe",
"passwordResetAllowedRetries":"Nombre d'essais pour réinitialiser le mot de passe",
"persistent":"Persistantes", "persistent":"Persistantes",
"persistentSessions":"Sessions persistantes", "persistentSessions":"Sessions persistantes",
"persistentStorage":"Module Apache::Session", "persistentStorage":"Module Apache::Session",
......
...@@ -567,6 +567,7 @@ ...@@ -567,6 +567,7 @@
"password":"Mật khẩu", "password":"Mật khẩu",
"passwordDB":"Mô-đun mật khẩu", "passwordDB":"Mô-đun mật khẩu",
"passwordManagement":"Quản lý mật khẩu", "passwordManagement":"Quản lý mật khẩu",
"passwordResetAllowedRetries":"Max reset password retries",
"persistent":"Duy trì", "persistent":"Duy trì",
"persistentSessions":"Duy trì phiên", "persistentSessions":"Duy trì phiên",
"persistentStorage":"Tập lệnh Apache :: Session", "persistentStorage":"Tập lệnh Apache :: Session",
......
...@@ -360,7 +360,7 @@ sub _reset { ...@@ -360,7 +360,7 @@ sub _reset {
# User has a valid mailToken, allow to change password # User has a valid mailToken, allow to change password
# A token is required # 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_PASSWORDFIRSTACCESS if ( $req->method eq 'GET' );
return PE_PASSWORDFORMEMPTY; 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