Add password first access error case in mail reset (#377)
This commit is contained in:
parent
1811394d43
commit
9b97d72584
|
@ -88,6 +88,7 @@ sub portalTab {
|
|||
68 => 'PORTAL_CAS_SERVICE_NOT_ALLOWED',
|
||||
69 => 'PORTAL_MAILFIRSTACCESS',
|
||||
70 => 'PORTAL_MAILNOTFOUND',
|
||||
71 => 'PORTAL_PASSWORDFIRSTACCESS',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -311,8 +311,10 @@ sub changePassword {
|
|||
|
||||
# Else a password is required
|
||||
else {
|
||||
return PE_PASSWORDFORMEMPTY
|
||||
unless ( $self->{newpassword} && $self->{confirmpassword} );
|
||||
unless ( $self->{newpassword} && $self->{confirmpassword} ) {
|
||||
return PE_PASSWORDFIRSTACCESS if ( $self->request_method =~ /GET/ );
|
||||
return PE_PASSWORDFORMEMPTY;
|
||||
}
|
||||
}
|
||||
|
||||
# Modify the password
|
||||
|
|
|
@ -140,6 +140,7 @@ use constant {
|
|||
PE_CAS_SERVICE_NOT_ALLOWED => 68,
|
||||
PE_MAILFIRSTACCESS => 69,
|
||||
PE_MAILNOTFOUND => 70,
|
||||
PE_PASSWORDFIRSTACCESS => 71,
|
||||
|
||||
# Portal messages
|
||||
PM_USER => 0,
|
||||
|
@ -184,7 +185,7 @@ our @EXPORT = qw( PE_IMG_NOK PE_IMG_OK PE_INFO PE_REDIRECT PE_DONE PE_OK
|
|||
PE_SAML_LOAD_SP_ERROR PE_SAML_ATTR_ERROR PE_OPENID_EMPTY PE_OPENID_BADID
|
||||
PE_MISSINGREQATTR PE_BADPARTNER PE_MAILCONFIRMATION_ALREADY_SENT
|
||||
PE_PASSWORDFORMEMPTY PE_CAS_SERVICE_NOT_ALLOWED PE_MAILFIRSTACCESS
|
||||
PE_MAILNOTFOUND
|
||||
PE_MAILNOTFOUND PE_PASSWORDFIRSTACCESS
|
||||
PM_USER PM_DATE PM_IP PM_SESSIONS_DELETED PM_OTHER_SESSIONS
|
||||
PM_REMOVE_OTHER_SESSIONS PM_PP_GRACE PM_PP_EXP_WARNING
|
||||
PM_SAML_IDPSELECT PM_SAML_IDPCHOOSEN PM_REMEMBERCHOICE PM_SAML_SPLOGOUT
|
||||
|
@ -796,10 +797,10 @@ sub error_type {
|
|||
if (
|
||||
scalar(
|
||||
grep { /^$code$/ } (
|
||||
PE_REDIRECT, PE_DONE,
|
||||
PE_OK, PE_PASSWORD_OK,
|
||||
PE_MAILOK, PE_LOGOUT_OK,
|
||||
PE_MAILFIRSTACCESS,
|
||||
PE_REDIRECT, PE_DONE,
|
||||
PE_OK, PE_PASSWORD_OK,
|
||||
PE_MAILOK, PE_LOGOUT_OK,
|
||||
PE_MAILFIRSTACCESS, PE_PASSWORDFIRSTACCESS,
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -130,6 +130,7 @@ __END__
|
|||
# * PE_CAS_SERVICE_NOT_ALLOWED 68
|
||||
# * PE_MAILFIRSTACCESS 69
|
||||
# * PE_MAILNOTFOUND 70
|
||||
# * PE_PASSWORDFIRSTACCESS 71
|
||||
|
||||
# Not used in errors:
|
||||
# * PE_DONE -1
|
||||
|
@ -212,6 +213,7 @@ sub error_fr {
|
|||
'Accès non autorisé au service CAS',
|
||||
'Merci de saisir votre adresse mail',
|
||||
'Pas d\'utilisateur correspondant',
|
||||
'Merci de saisir votre nouveau mot de passe',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -291,6 +293,7 @@ sub error_en {
|
|||
'Access non granted on CAS service',
|
||||
'Please provide your mail address',
|
||||
'No matching user',
|
||||
'Please provide your new password',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -371,6 +374,7 @@ sub error_ro {
|
|||
'Access non granted on CAS service',
|
||||
'Vă rugăm să introduceţi adresa dvs. de e-mail',
|
||||
'No matching user',
|
||||
'Please provide your new password',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user