Commit 6e8efac7 authored by Xavier Guimard's avatar Xavier Guimard

Display an explanation (#1487)

parent 4d129872
......@@ -281,7 +281,9 @@ sub _displayRegister {
};
}
}
if ( @am == 1 and not $req->userData->{_2fDevices} ) {
if ( @am == 1
and not( $req->userData->{_2fDevices} or $req->data->{sfRegRequired} ) )
{
return [ 302, [ Location => $self->conf->{portal} . $am[0]->{URL} ],
[] ];
}
......@@ -298,9 +300,10 @@ sub _displayRegister {
$req,
'2fregisters',
params => {
SKIN => $self->conf->{portalSkin},
MODULES => \@am,
SFDEVICES => $_2fDevices,
SKIN => $self->conf->{portalSkin},
MODULES => \@am,
SFDEVICES => $_2fDevices,
REG_REQUIRED => $req->data->{sfRegRequired},
}
);
}
......@@ -347,6 +350,7 @@ sub restoreSession {
my $token = $req->pdata->{sfRegToken}
or return [ 302, [ Location => $self->conf->{portal} ], [] ];
$req->userData( $self->ott->getToken( $token, 1 ) );
$req->data->{sfRegRequired} = 1;
return $req->method eq 'POST'
? $self->register( $req, @path )
: $self->_displayRegister( $req, @path );
......
......@@ -86,6 +86,7 @@
"PE84":"أنت غير مخول بالدخول إلى هذا الخادم",
"PE85":" الموقع البعيد يطلب جلسة جديدة (ولم يتم تحميل برنامج ترقية الجلسة).\nسجل الخروج و أعد المحاولة",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"قبول",
"accessDenied":"ليس لديك إذن بالدخول لهذا التطبيق",
"accountCreated":"تم إنشاء حسابك و إرسال كلمة المرور المؤقتة إلى بريدك الإلكتروني.",
......
......@@ -86,6 +86,7 @@
"PE84":"You're not authorized to access to this host",
"PE85":"The remote site ask for a newer session (and UpgradeSession plugin isn't loaded). Logout and retry",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accept",
"accessDenied":"You have no access authorization for this application",
"accountCreated":"Your account has been created, your temporary password has been sent to your mail address.",
......
......@@ -86,6 +86,7 @@
"PE84":"You're not authorized to access to this host",
"PE85":"The remote site ask for a newer session (and UpgradeSession plugin isn't loaded). Logout and retry",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accept",
"accessDenied":"You have no access authorization for this application",
"accountCreated":"Your account has been created, your temporary password has been sent to your mail address.",
......
......@@ -86,6 +86,7 @@
"PE84":"You're not authorized to access to this host",
"PE85":"The remote site ask for a newer session (and UpgradeSession plugin isn't loaded). Logout and retry",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accept",
"accessDenied":"You have no access authorization for this application",
"accountCreated":"Your account has been created, your temporary password has been sent to your mail address.",
......
......@@ -86,6 +86,7 @@
"PE84":"Vous n'êtes pas autorisé à accéder à ce site",
"PE85":"Le site souhaite une authentification plus récente (et le plugin UpgradeSession n'est pas chargé). Déconnectez-vous et réessayez",
"2FManagment":"Gestionnaire 2ndFA",
"2fRegRequired":"Ce service requiert une authentification à deux facteurs. Enregistrez un équipement ici et retournez au portail.",
"accept":"Accepter",
"accessDenied":"Vous n'avez pas les droits d'accès à cette application",
"accountCreated":"Votre compte a été créé, un mot de passe temporaire a été envoyé à votre adresse mail.",
......
......@@ -86,6 +86,7 @@
"PE84":"Non sei autorizzato ad accedere a questo host",
"PE85":"Il sito remoto richiede una sessione più recente (e il plug-in di UpgradeSession non viene caricato). Disconnetti e riprova",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accetta",
"accessDenied":"Non hai un'autorizzazione di accesso per questa applicazione",
"accountCreated":"Il tuo account è stato creato, la tua password temporanea è stata inviata all'indirizzo email.",
......
......@@ -86,6 +86,7 @@
"PE84":"You're not authorized to access to this host",
"PE85":"The remote site ask for a newer session (and UpgradeSession plugin isn't loaded). Logout and retry",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accept",
"accessDenied":"You have no access authorization for this application",
"accountCreated":"Your account has been created, your temporary password has been sent to your mail address.",
......
......@@ -86,6 +86,7 @@
"PE84":"You're not authorized to access to this host",
"PE85":"The remote site ask for a newer session (and UpgradeSession plugin isn't loaded). Logout and retry",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accept",
"accessDenied":"You have no access authorization for this application",
"accountCreated":"Your account has been created, your temporary password has been sent to your mail address.",
......
......@@ -86,6 +86,7 @@
"PE84":"You're not authorized to access to this host",
"PE85":"The remote site ask for a newer session (and UpgradeSession plugin isn't loaded). Logout and retry",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Accept",
"accessDenied":"You have no access authorization for this application",
"accountCreated":"Your account has been created, your temporary password has been sent to your mail address.",
......
......@@ -86,6 +86,7 @@
"PE84":"Bạn không được phép truy cập vào máy chủ lưu trữ này",
"PE85":"Trang web từ xa yêu cầu một phiên mới (và plugin UpgradeSession không được tải). Đăng xuất và thử lại ",
"2FManagment":"2ndFA Management",
"2fRegRequired":"This service requires a double factor authentication. Register a device now, then go back to the portal.",
"accept":"Chấp nhận",
"accessDenied":"Bạn không có quyền truy cập vào ứng dụng này",
"accountCreated":"Tài khoản của bạn đã được tạo, mật khẩu tạm thời của bạn đã được gửi đến địa chỉ mail của bạn.",
......
<TMPL_INCLUDE NAME="header.tpl">
<div class="container">
<div id="color" class="message message-positive alert"><span id="msg" trspan="choose2f"></span></div>
<div id="color" class="message message-positive alert">
<TMPL_IF NAME="REG_REQUIRED">
<span trspan="2fRegRequired"></span>
<TMPL_ELSE>
<span id="msg" trspan="choose2f"></span>
</TMPL_IF>
</div>
<TMPL_IF NAME="SFDEVICES">
<div class="alert alert-info">
<table class="table table-hover table-condensed table-responsive">
......
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