Commit 45157685 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛
Browse files

Display explicit error message (#2329)

parent 3e026826
......@@ -21,6 +21,7 @@ sub portalConsts {
'102' => 'PE_UPGRADESESSION',
'103' => 'PE_NO_SECOND_FACTORS',
'2' => 'PE_FORMEMPTY',
'20' => 'PE_NO_PASSWORD_BE',
'21' => 'PE_PP_ACCOUNT_LOCKED',
'22' => 'PE_PP_PASSWORD_EXPIRED',
'23' => 'PE_CERTIFICATEREQUIRED',
......
......@@ -5,7 +5,7 @@
package Lemonldap::NG::Manager::Build::PortalConstants;
our $VERSION = '2.0.8';
our $VERSION = '2.0.12';
sub portalConstants {
return {
......@@ -28,6 +28,7 @@ sub portalConstants {
PE_APACHESESSIONERROR => 8,
PE_FIRSTACCESS => 9,
PE_BADCERTIFICATE => 10,
PE_NO_PASSWORD_BE => 20,
PE_PP_ACCOUNT_LOCKED => 21,
PE_PP_PASSWORD_EXPIRED => 22,
PE_CERTIFICATEREQUIRED => 23,
......
......@@ -24,6 +24,7 @@ use constant {
PE_APACHESESSIONERROR => 8,
PE_FIRSTACCESS => 9,
PE_BADCERTIFICATE => 10,
PE_NO_PASSWORD_BE => 20,
PE_PP_ACCOUNT_LOCKED => 21,
PE_PP_PASSWORD_EXPIRED => 22,
PE_CERTIFICATEREQUIRED => 23,
......@@ -124,6 +125,7 @@ sub portalConsts {
'102' => 'PE_UPGRADESESSION',
'103' => 'PE_NO_SECOND_FACTORS',
'2' => 'PE_FORMEMPTY',
'20' => 'PE_NO_PASSWORD_BE',
'21' => 'PE_PP_ACCOUNT_LOCKED',
'22' => 'PE_PP_PASSWORD_EXPIRED',
'23' => 'PE_CERTIFICATEREQUIRED',
......@@ -234,6 +236,7 @@ our @EXPORT_OK = (
'PE_APACHESESSIONERROR',
'PE_FIRSTACCESS',
'PE_BADCERTIFICATE',
'PE_NO_PASSWORD_BE',
'PE_PP_ACCOUNT_LOCKED',
'PE_PP_PASSWORD_EXPIRED',
'PE_CERTIFICATEREQUIRED',
......
......@@ -2,7 +2,7 @@
# into "plugins" list in lemonldap-ng.ini, section "portal"
package Lemonldap::NG::Portal::Main::Plugins;
our $VERSION = '2.0.11';
our $VERSION = '2.0.12';
package Lemonldap::NG::Portal::Main;
......@@ -82,8 +82,9 @@ sub enabledPlugins {
# Add REST (check is done by it)
push @res, '::Plugins::RESTServer';
# Check if password is enabled
if ( my $p = $conf->{passwordDB} ) {
push @res, "::Password::$p" if ( $p ne 'Null' );
push @res, "::Password::$p";
}
# Check if register is enabled
......@@ -91,11 +92,11 @@ sub enabledPlugins {
if ( $conf->{registerDB} and $conf->{registerDB} ne 'Null' );
# Check if custom plugins are required
# TODO: change this name
if ( $conf->{customPlugins} ) {
$self->logger->debug( 'Custom plugins: ' . $conf->{customPlugins} );
push @res, grep ( /\w+/, split( /,\s*/, $conf->{customPlugins} ) );
}
return @res;
}
......
......@@ -9,7 +9,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
extends 'Lemonldap::NG::Portal::Password::Base';
our $VERSION = '2.0.0';
our $VERSION = '2.0.12';
sub init {
my ($self) = @_;
......@@ -25,7 +25,7 @@ sub modifyPassword {
my ( $self, $req, $pwd ) = @_;
# Nothing to do here, all new passwords are accepted
PE_PASSWORD_OK;
return PE_PASSWORD_OK;
}
1;
......@@ -3,19 +3,23 @@ package Lemonldap::NG::Portal::Password::Null;
use strict;
use Mouse;
use Lemonldap::NG::Portal::Main::Constants qw(
PE_PASSWORD_OK
PE_NO_PASSWORD_BE
);
extends 'Lemonldap::NG::Portal::Password::Base';
our $VERSION = '2.0.0';
our $VERSION = '2.0.12';
sub init { 1 }
sub init {
return 1;
}
sub confirm { 1 }
sub confirm {
return 1;
}
sub modifyPassword {
PE_PASSWORD_OK;
return PE_NO_PASSWORD_BE;
}
1;
......@@ -10,6 +10,7 @@
"PE8":"أباتشي :: فشل وحدة الجلسة",
"PE9":"مطلوب إثبات الهوية",
"PE10":" الشهادات الرقمية غير صالحة",
"PE20":"No password backend defined",
"PE21":"حسابك مقفل",
"PE22":"انتهت صلاحية كلمة المرور",
"PE23":"الشهادة الرقمية مطلوبة",
......
......@@ -10,6 +10,7 @@
"PE8":"Fehler des gewählten Apache::Session Moduls",
"PE9":"Authentifizieren Sie sich bitte",
"PE10":"Zertifikat ungültig",
"PE20":"No password backend defined",
"PE21":"Ihr Konto ist blockiert",
"PE22":"Ihr Passwort ist abgelaufen",
"PE23":"Zertifikat erforderlich",
......
......@@ -10,6 +10,7 @@
"PE8":"Apache::Session module failed",
"PE9":"Authentication required",
"PE10":"Invalid certificate",
"PE20":"No password backend defined",
"PE21":"Your account is locked",
"PE22":"Your password has expired",
"PE23":"Certificate required",
......
......@@ -10,6 +10,7 @@
"PE8":"Error del módulo Apache::Session seleccionado",
"PE9":"Se necesita autentificación",
"PE10":"Certificado inválido",
"PE20":"No password backend defined",
"PE21":"Su cuenta está bloqueada",
"PE22":"Su contraseña ha caducado",
"PE23":"Certificado requerido",
......
......@@ -10,6 +10,7 @@
"PE8":"Apache::Session moduulissa tapahtui virhe",
"PE9":"Kirjautuminen vaaditaan",
"PE10":"Virheellinen varmenne",
"PE20":"No password backend defined",
"PE21":"Tunnuksesi on lukittu",
"PE22":"Salasanasi on vanhentunut",
"PE23":"Varmenne vaaditaan",
......
......@@ -10,6 +10,7 @@
"PE8":"Erreur du module Apache::Session choisi",
"PE9":"Veuillez vous authentifier",
"PE10":"Certificat invalide",
"PE20":"Base des mots de passe non définie",
"PE21":"Votre compte est bloqué",
"PE22":"Votre mot de passe a expiré",
"PE23":"Certificat exigé",
......
......@@ -10,6 +10,7 @@
"PE8":"Errore del modulo Apache::Session",
"PE9":"Autenticazione necessaria",
"PE10":"Certificato non valido",
"PE20":"No password backend defined",
"PE21":"Account bloccato",
"PE22":"Password scaduta",
"PE23":"Certificato richiesto",
......
......@@ -10,6 +10,7 @@
"PE8":"Fout Apache-module::Gekozen sessie",
"PE9":"Identificeer uzelf",
"PE10":"Ongeldig certificaat",
"PE20":"No password backend defined",
"PE21":"Uw account is geblokkeerd",
"PE22":"Uw wachtwoord is verlopen",
"PE23":"Certificaat nodig",
......
......@@ -10,6 +10,7 @@
"PE8":"Błąd modułu Apache::Session",
"PE9":"Wymagane uwierzytelnienie",
"PE10":"Niepoprawny certyfikat",
"PE20":"No password backend defined",
"PE21":"Twoje konto jest zablokowane",
"PE22":"Twoje hasło wygasło",
"PE23":"Wymagany certyfikat",
......
......@@ -10,6 +10,7 @@
"PE8":"Erro do módulo Apache::Sessão escolhida",
"PE9":"Queira autenticar-se",
"PE10":"Certificado inválido",
"PE20":"No password backend defined",
"PE21":"A sua conta está bloqueada",
"PE22":"A sua senha expirou",
"PE23":"Certificado exigido",
......
......@@ -10,6 +10,7 @@
"PE8":"Eroare a modulului Apache::Session aleasă",
"PE9":"Autentificare cerută",
"PE10":"Certificat invalid",
"PE20":"No password backend defined",
"PE21":"Contul dvs. este blocat",
"PE22":"Parola dvs. a expirat",
"PE23":"Certificat cerut",
......
......@@ -10,6 +10,7 @@
"PE8":"Apache::Session modülü hata verdi",
"PE9":"Kimlik doğrulama gerekli",
"PE10":"Geçersiz sertifika",
"PE20":"No password backend defined",
"PE21":"Hesabınız kilitli",
"PE22":"Parolanızın süresi doldu",
"PE23":"Sertifika gerekli",
......
......@@ -10,6 +10,7 @@
"PE8":"Mô-đun Apache::Session báo lỗi",
"PE9":"Yêu cầu xác thực",
"PE10":"Chứng chỉ không hợp lệ",
"PE20":"No password backend defined",
"PE21":"Tài khoản của bạn bị khóa",
"PE22":"Mật khẩu của bạn đã hết hạn",
"PE23":"Chứng chỉ bắt buộc",
......
......@@ -10,6 +10,7 @@
"PE8":"Apache::Session 模块 错误",
"PE9":"需要认证",
"PE10":"无效的证书",
"PE20":"No password backend defined",
"PE21":"您的账号被锁定",
"PE22":"您的密码已经过期",
"PE23":"需要证书",
......
Supports Markdown
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