Redirect to Portal (#1976)
This commit is contained in:
parent
60ce68ce23
commit
f956810e48
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"عدد عمليات تسجيل الدخول الفاشلة المسجلة",
|
||||
"fileToUpload":"الملف الذي ستحمله",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"لست مخولا بعرض هذه الصفحة",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Number of registered failed logins",
|
||||
"fileToUpload":"File to upload",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"You're not authorized to show this page",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Número de fallos en la identificación",
|
||||
"fileToUpload":"Fichero a cargar",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"No está autorizado a mostrar esta página",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Nombre d'échecs de connexion mémorisés",
|
||||
"fileToUpload":"Fichier à télécharger",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Rechercher un compte",
|
||||
"findUsers":"Recherche de compte",
|
||||
"findUserSearchingAttributes":"Attributs de recherche",
|
||||
"findUserExcludingAttributes":"Attributs d'exclusion",
|
||||
"forbidden":"Vous n'êtes pas autorisé à visualiser cette page",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Numero di login registrati non riusciti",
|
||||
"fileToUpload":"File da caricare",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"Non sei autorizzato a mostrare questa pagina",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Liczba zarejestrowanych nieudanych prób logowania",
|
||||
"fileToUpload":"Plik do przesłania",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"Nie masz uprawnień do wyświetlania tej strony",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Kayıtlı başarısız giriş sayısı",
|
||||
"fileToUpload":"Yüklenecek dosya",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"Bu sayfayı görüntülemek için yetkili değilsiniz",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Số lượt đăng nhập thất bại",
|
||||
"fileToUpload":"Tập tin để tải lên",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"Bạn không được ủy quyền để hiển thị trang này",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"Number of registered failed logins",
|
||||
"fileToUpload":"上传的文件",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"You're not authorized to show this page",
|
||||
|
|
|
@ -329,7 +329,7 @@
|
|||
"failedLoginNumber":"已註冊的失敗登入數",
|
||||
"fileToUpload":"上傳失敗",
|
||||
"findUser":"Activation",
|
||||
"findUsers":"Search user account",
|
||||
"findUsers":"Search for user account",
|
||||
"findUserSearchingAttributes":"Searching attributes",
|
||||
"findUserExcludingAttributes":"Excluding attributes",
|
||||
"forbidden":"您無權顯示此頁面",
|
||||
|
|
|
@ -485,7 +485,7 @@ sub display {
|
|||
{
|
||||
$login = $req->{findUser};
|
||||
$self->logger->debug(
|
||||
'Build an array ref with searching fields...');
|
||||
'Building array ref with searching fields...');
|
||||
@$fields = map { {
|
||||
key => $_,
|
||||
value =>
|
||||
|
|
|
@ -64,8 +64,6 @@ sub provideUser {
|
|||
$self->logger->debug("Process returned error: $error");
|
||||
return $req->error($error);
|
||||
}
|
||||
|
||||
$req->mustRedirect(0);
|
||||
return $self->sendJSONresponse(
|
||||
$req,
|
||||
{
|
||||
|
@ -88,7 +86,9 @@ sub retreiveFindUserParams {
|
|||
}
|
||||
}
|
||||
|
||||
if ( scalar @$searching ) {
|
||||
if ( scalar @$searching
|
||||
&& keys %{ $self->conf->{findUserExcludingAttributes} } )
|
||||
{
|
||||
$self->logger->debug("FindUser: reading excluding parameters...");
|
||||
foreach ( sort keys %{ $self->conf->{findUserExcludingAttributes} } ) {
|
||||
if ( $req->params($_) ) {
|
||||
|
|
|
@ -99,13 +99,16 @@ sub findUser {
|
|||
: ();
|
||||
} keys %demoAccounts;
|
||||
|
||||
my $rank = rand( scalar @results );
|
||||
$self->logger->debug(
|
||||
'Demo UserDB number of result(s): ' . scalar @results );
|
||||
$self->logger->debug("Demo UserDB random rank: $rank");
|
||||
$self->userLogger->info("FindUser: Demo UserDB returns $results[$rank]");
|
||||
$req->{findUser} = $results[$rank];
|
||||
|
||||
if ( scalar @results ) {
|
||||
my $rank = rand( scalar @results );
|
||||
$self->logger->debug("Demo UserDB random rank: $rank");
|
||||
$self->userLogger->info(
|
||||
"FindUser: Demo UserDB returns $results[$rank]");
|
||||
$req->{findUser} = $results[$rank];
|
||||
}
|
||||
|
||||
PE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -529,3 +529,7 @@ $(window).on 'load', () ->
|
|||
$("#show-hide-icon-button").addClass 'fa-eye'
|
||||
|
||||
#$('#formpass').on 'submit', changePwd
|
||||
|
||||
if window.location.href.match /\/finduser/
|
||||
console.log 'Set Portal URL: ' + portal
|
||||
window.history.pushState({page: 'Portal'}, 'Portal', portal)
|
||||
|
|
|
@ -548,7 +548,7 @@ LemonLDAP::NG Portal jQuery scripts
|
|||
$('.oidcConsent').on('click', function() {
|
||||
return removeOidcConsent($(this).attr('partner'));
|
||||
});
|
||||
return $('#show-hide-button').on('click', function() {
|
||||
$('#show-hide-button').on('click', function() {
|
||||
if ($("#newpassword").attr('type') === 'password') {
|
||||
console.log('Show passwords');
|
||||
$("#newpassword").attr('type', 'input');
|
||||
|
@ -563,6 +563,12 @@ LemonLDAP::NG Portal jQuery scripts
|
|||
return $("#show-hide-icon-button").addClass('fa-eye');
|
||||
}
|
||||
});
|
||||
if (window.location.href.match(/\/finduser/)) {
|
||||
console.log('Set Portal URL: ' + portal);
|
||||
return window.history.pushState({
|
||||
page: 'Portal'
|
||||
}, 'Portal', portal);
|
||||
}
|
||||
});
|
||||
|
||||
}).call(this);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
<br>
|
||||
<div class="card">
|
||||
<br>
|
||||
<form action="/finduser" method="post" role="form" class="login">
|
||||
<form action="/finduser" id="searchAccount" method="post" role="form" class="login">
|
||||
<div class="form">
|
||||
<TMPL_IF NAME="TOKEN">
|
||||
<input type="hidden" name="token" value="<TMPL_VAR NAME="TOKEN">" />
|
||||
|
@ -12,7 +12,7 @@
|
|||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><label for="<TMPL_VAR NAME="key">" class="mb-0"><i class="fa fa-user"></i></label></span>
|
||||
</div>
|
||||
<input id="findUser<TMPL_VAR NAME="key">" name="<TMPL_VAR NAME="key">" type="text" autocomplete="off" class="form-control" placeholder="<TMPL_VAR NAME="value">" />
|
||||
<input id="findUser_<TMPL_VAR NAME="key">" name="<TMPL_VAR NAME="key">" type="text" autocomplete="off" class="form-control" placeholder="<TMPL_VAR NAME="value">" />
|
||||
</div>
|
||||
</TMPL_LOOP>
|
||||
<button type="submit" class="btn btn-info" >
|
||||
|
|
|
@ -82,16 +82,16 @@ SKIP: {
|
|||
or explain( $res->[2]->[0], 'value="dwho"' );
|
||||
ok( $res->[2]->[0] =~ m%autocomplete="off"%, 'autocomplete="off"' )
|
||||
or explain( $res->[2]->[0], 'autocomplete="off"' );
|
||||
ok( $res->[2]->[0] =~ m%<span trspan="searchAccount">Search an account</span>%, 'Search an account' )
|
||||
or explain( $res->[2]->[0], 'Search an account' );
|
||||
ok( $res->[2]->[0] =~ m%<span trspan="searchAccount">Search for an account</span>%, 'Search an account' )
|
||||
or explain( $res->[2]->[0], 'Search for an account' );
|
||||
ok(
|
||||
$res->[2]->[0] =~
|
||||
m%<input id="findUserguy" name="guy" type="text" autocomplete="off" class="form-control" placeholder="Kind" />%,
|
||||
m%<input id="findUser_guy" name="guy" type="text" autocomplete="off" class="form-control" placeholder="Kind" />%,
|
||||
'id="findUserguy"'
|
||||
) or explain( $res->[2]->[0], 'id="findUserguy"' );
|
||||
ok(
|
||||
$res->[2]->[0] =~
|
||||
m%<input id="findUseruser" name="user" type="text" autocomplete="off" class="form-control" placeholder="Login" />%,
|
||||
m%<input id="findUser_user" name="user" type="text" autocomplete="off" class="form-control" placeholder="Login" />%,
|
||||
'id="findUseruser"'
|
||||
) or explain( $res->[2]->[0], 'id="findUseruser"' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user