Merge branch 'v2.0': findUser may be broken
This commit is contained in:
commit
a282a37b66
|
@ -17,7 +17,7 @@ sub accessToTrace {
|
|||
my $params = $hash->{params};
|
||||
my $session = $hash->{session};
|
||||
|
||||
return "$custom alias $params->[0]_$params->[1]:$session->{groups} with $session->{$params->[2]}";
|
||||
return "$custom alias $params->[0]_$params->[1]:$session->{groups} ($session->{$params->[2]})";
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -171,7 +171,7 @@
|
|||
"vhostHttps": -1,
|
||||
"vhostAliases": "",
|
||||
"vhostServiceTokenTTL": -1,
|
||||
"vhostAccessToTrace": "My::accessToTrace, Doctor, Who","vhostType":"Main"
|
||||
"vhostAccessToTrace": "My::accessToTrace, Doctor, Who, _whatToTrace","vhostType":"Main"
|
||||
}
|
||||
},
|
||||
"loginHistoryEnabled": 1,
|
||||
|
|
|
@ -65,8 +65,9 @@ Options:
|
|||
- safe <0|1> : fail in case the requested configuration is invalid
|
||||
- force <0|1> : allow overwrite of existing config number
|
||||
- cfgNum <num> : set new configuration number (requires -force 1)
|
||||
- nohistory : do not increment configuration number (requires -force 1)
|
||||
- sep <char> : separator of hierarchical values (by default: /)
|
||||
- iniFile <file> : path to an alternate lemonldap-ng.ini file
|
||||
- iniFile <file> : path to an alternative lemonldap-ng.ini file
|
||||
|
||||
See Lemonldap::NG::Manager::Cli(3) for more
|
||||
};
|
||||
|
@ -170,13 +171,25 @@ Allows you to set the log message that will be displayed in the manager
|
|||
|
||||
The configuration change will be aborted if it contains errors (default: 0)
|
||||
|
||||
=item -force
|
||||
|
||||
Allows you to force overwriting an existing configuration (default: 0)
|
||||
|
||||
=item -cfgNum
|
||||
|
||||
Choose a particular configuration number (default: latest)
|
||||
|
||||
=item -force
|
||||
=item -nohistory
|
||||
|
||||
Allows you to force overwriting an existing configuration (default: 0)
|
||||
Allows you to keep current configuration number
|
||||
|
||||
=item -sep
|
||||
|
||||
Allows you to define hierarchical separator
|
||||
|
||||
=item -iniFile
|
||||
|
||||
Allows you to set an alternative ini file
|
||||
|
||||
=back
|
||||
|
||||
|
@ -189,11 +202,13 @@ L<http://lemonldap-ng.org/>
|
|||
|
||||
=over
|
||||
|
||||
=item David Coutateur, E<lt>david.jose.delassus@gmail.comE<gt>
|
||||
=item Clement Oudot, E<lt>clement@oodo.netE<gt>
|
||||
|
||||
=item Clement Oudot, E<lt>clem.oudot@gmail.comE<gt>
|
||||
=item Xavier Guimard, E<lt>yadd@debian.orgE<gt>
|
||||
|
||||
=item Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
||||
=item Maxime Besson, E<lt>maxime.besson@worteks.comE<gt>
|
||||
|
||||
=item Christophe Maudoux, E<lt>chrmdx@gmail.comE<gt>
|
||||
|
||||
=back
|
||||
|
||||
|
@ -205,7 +220,7 @@ L<https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/issues>
|
|||
=head1 DOWNLOAD
|
||||
|
||||
Lemonldap::NG is available at
|
||||
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
||||
L<https://release.ow2.org/lemonldap/>
|
||||
|
||||
=head1 COPYRIGHT AND LICENSE
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ sub checkMaintenanceMode {
|
|||
$class->tsv->{defaultCondition}->{$vhost}
|
||||
and (
|
||||
time() - $class->tsv->{lastVhostUpdate}->{$vhost} <
|
||||
$class->tsv->{checkTime} )
|
||||
$class->checkTime )
|
||||
);
|
||||
|
||||
return $class->Lemonldap::NG::Handler::Main::checkMaintenanceMode($req);
|
||||
|
|
|
@ -59,9 +59,16 @@ sub checkConf {
|
|||
}
|
||||
$Lemonldap::NG::Common::Conf::msg = '';
|
||||
|
||||
if ( $force or !$class->cfgNum or $class->cfgNum != $conf->{cfgNum} ) {
|
||||
if ( $force
|
||||
or !$class->cfgNum
|
||||
or !$class->cfgDate
|
||||
or $class->cfgNum != $conf->{cfgNum}
|
||||
or $class->cfgDate != $conf->{cfgDate} )
|
||||
{
|
||||
$class->logger->debug("Get configuration $conf->{cfgNum}");
|
||||
unless ( $class->cfgNum( $conf->{cfgNum} ) ) {
|
||||
unless ( $class->cfgNum( $conf->{cfgNum} )
|
||||
&& $class->cfgDate( $conf->{cfgDate} ) )
|
||||
{
|
||||
$class->logger->error('No configuration available');
|
||||
return 0;
|
||||
}
|
||||
|
@ -80,7 +87,7 @@ sub checkConf {
|
|||
}
|
||||
}
|
||||
}
|
||||
$class->tsv->{checkTime} = $conf->{checkTime} if ( $conf->{checkTime} );
|
||||
$class->checkTime( $conf->{checkTime} ) if $conf->{checkTime};
|
||||
$class->lastCheck( time() );
|
||||
$class->logger->debug("$class: configuration is up to date");
|
||||
return 1;
|
||||
|
|
|
@ -2,7 +2,7 @@ package Lemonldap::NG::Handler::Main::SharedVariables;
|
|||
|
||||
our $VERSION = '2.1.0';
|
||||
|
||||
# Since handler has no instances but only static classes, this module provides
|
||||
# Since handler has no instance but only static classes, this module provides
|
||||
# classes properties with accessors
|
||||
|
||||
package Lemonldap::NG::Handler::Main;
|
||||
|
@ -14,6 +14,7 @@ BEGIN {
|
|||
our $_tshv = {
|
||||
tsv => {},
|
||||
cfgNum => 0,
|
||||
cfgDate => 0,
|
||||
lastCheck => 0,
|
||||
checkTime => 600,
|
||||
confAcc => {},
|
||||
|
@ -30,7 +31,7 @@ BEGIN {
|
|||
foreach ( keys %$_tshv ) {
|
||||
eval " sub $_ {
|
||||
my \$v = \$_[1];
|
||||
\$_tshv->{$_} = \$v if(defined \$v);
|
||||
\$_tshv->{$_} = \$v if (defined \$v);
|
||||
return \$_tshv->{$_};
|
||||
}";
|
||||
die $@ if ($@);
|
||||
|
@ -41,7 +42,7 @@ BEGIN {
|
|||
foreach ( keys %$_v ) {
|
||||
eval " sub $_ {
|
||||
my \$v = \$_[1];
|
||||
\$_v->{$_} = \$v if(\$v);
|
||||
\$_v->{$_} = \$v if (\$v);
|
||||
return \$_v->{$_};
|
||||
}";
|
||||
die $@ if ($@);
|
||||
|
|
|
@ -29,6 +29,7 @@ has format => ( is => 'rw', isa => 'Str', default => "%-25s | %-25s | %-25s" );
|
|||
has yes => ( is => 'rw', isa => 'Bool', default => 0 );
|
||||
has safe => ( is => 'rw', isa => 'Bool', default => 0 );
|
||||
has force => ( is => 'rw', isa => 'Bool', default => 0 );
|
||||
has nohistory => ( is => 'rw', isa => 'Bool', default => 0 );
|
||||
has logger => ( is => 'ro', lazy => 1, builder => sub { $_[0]->mgr->logger } );
|
||||
has userLogger =>
|
||||
( is => 'ro', lazy => 1, builder => sub { $_[0]->mgr->userLogger } );
|
||||
|
@ -355,7 +356,7 @@ sub rollback {
|
|||
or die $Lemonldap::NG::Common::Conf::msg;
|
||||
|
||||
$conf->{cfgNum} = $lastCfg;
|
||||
$conf->{cfgAuthor} = scalar( getpwuid $< ) . '(command-line-interface)';
|
||||
$conf->{cfgAuthor} = scalar( getpwuid $< ) . ' (command-line-interface)';
|
||||
chomp $conf->{cfgAuthor};
|
||||
$conf->{cfgAuthorIP} = '127.0.0.1';
|
||||
$conf->{cfgDate} = time;
|
||||
|
@ -416,8 +417,7 @@ sub _setKey {
|
|||
sub _save {
|
||||
my ( $self, $new ) = @_;
|
||||
require Lemonldap::NG::Manager::Conf::Parser;
|
||||
my $parser = Lemonldap::NG::Manager::Conf::Parser->new(
|
||||
{
|
||||
my $parser = Lemonldap::NG::Manager::Conf::Parser->new( {
|
||||
newConf => $new,
|
||||
refConf => $self->mgr->hLoadedPlugins->{conf}->currentConf,
|
||||
req => $self->req
|
||||
|
@ -433,6 +433,7 @@ sub _save {
|
|||
print STDERR "$msg\n";
|
||||
}
|
||||
}
|
||||
|
||||
my $saveParams = { force => $self->force };
|
||||
if ( $self->force and $self->cfgNum ) {
|
||||
$self->logger->debug( "CLI: cfgNum forced with " . $self->cfgNum );
|
||||
|
@ -440,6 +441,15 @@ sub _save {
|
|||
$saveParams->{cfgNum} = $self->cfgNum;
|
||||
$saveParams->{cfgNumFixed} = 1;
|
||||
}
|
||||
if ( $self->force and $self->nohistory ) {
|
||||
my $lastCfg = $self->mgr->confAcc->lastCfg;
|
||||
$self->logger->debug(
|
||||
"CLI: No history required. cfgNum forced with " . $lastCfg );
|
||||
print STDERR "No history required. cfgNum forced with ", $lastCfg;
|
||||
$saveParams->{cfgNum} = $lastCfg;
|
||||
$saveParams->{cfgNumFixed} = 1;
|
||||
}
|
||||
|
||||
$new->{cfgAuthor} = scalar( getpwuid $< ) . '(command-line-interface)';
|
||||
chomp $new->{cfgAuthor};
|
||||
$new->{cfgAuthorIP} = '127.0.0.1';
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"المستخدم",
|
||||
"dbiAuthnLevel":"مستوى إثبات الهوية",
|
||||
"dbiConnection":"الاتصال",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dynamic hashing",
|
||||
"dbiDynamicHashEnabled":"dynamic hash activation",
|
||||
"dbiDynamicHashNewPasswordScheme":"Dynamic hash scheme for new passwords",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"كلمة المرور ",
|
||||
"dbiPasswordMailCol":"اسم حقل البريد",
|
||||
"dbiSchema":"مخطط",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"جدول المستخدم",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Decrypt functions",
|
||||
"decryptValueRule":"استخدام القاعدة",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"خدمة أل يو أر ل",
|
||||
"yubikey2fUserCanRemoveKey":"Allow user to remove Yubikey",
|
||||
"zeroConfExplanations":"لا يحتوي الخادم على إعدادات. استخدام قالب لحفظ الأول"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Benutzer",
|
||||
"dbiAuthnLevel":"Authentication level",
|
||||
"dbiConnection":"Verbindung",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dynamic hashing",
|
||||
"dbiDynamicHashEnabled":"dynamic hash activation",
|
||||
"dbiDynamicHashNewPasswordScheme":"Dynamic hash scheme for new passwords",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Passwort",
|
||||
"dbiPasswordMailCol":"Mail field name",
|
||||
"dbiSchema":"Schema",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"User table",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Decrypt functions",
|
||||
"decryptValueRule":"Use rule",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"Service URL",
|
||||
"yubikey2fUserCanRemoveKey":"Allow user to remove Yubikey",
|
||||
"zeroConfExplanations":"Server has no configuration. Use template to save the first."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"User",
|
||||
"dbiAuthnLevel":"Authentication level",
|
||||
"dbiConnection":"Connection",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dynamic hashing",
|
||||
"dbiDynamicHashEnabled":"dynamic hash activation",
|
||||
"dbiDynamicHashNewPasswordScheme":"Dynamic hash scheme for new passwords",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Password",
|
||||
"dbiPasswordMailCol":"Mail field name",
|
||||
"dbiSchema":"Schema",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"User table",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Decrypt functions",
|
||||
"decryptValueRule":"Use rule",
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Usuario",
|
||||
"dbiAuthnLevel":"Nivel de autentificación",
|
||||
"dbiConnection":"Conexión",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"Visor de diferencias",
|
||||
"dbiDynamicHashEnabled":"Activación de hash dinámico",
|
||||
"dbiDynamicHashNewPasswordScheme":"Esquema de hash dinámico para nuevos passwords",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Password",
|
||||
"dbiPasswordMailCol":"Nombre de campo de Correo",
|
||||
"dbiSchema":"Esquema",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"Tabla de usuario",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Funciones de descifrado",
|
||||
"decryptValueRule":"Regla de uso",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"Service URL",
|
||||
"yubikey2fUserCanRemoveKey":"Allow user to remove Yubikey",
|
||||
"zeroConfExplanations":"Server has no configuration. Use template to save the first."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Utilisateur",
|
||||
"dbiAuthnLevel":"Niveau d'authentification",
|
||||
"dbiConnection":"Connexion",
|
||||
"dbiConnectionAuth":"Authentification",
|
||||
"dbiConnectionUser":"Utilisateurs",
|
||||
"dbiDynamicHash":"Hashage dynamique",
|
||||
"dbiDynamicHashEnabled":"Activation des hashes dynamiques",
|
||||
"dbiDynamicHashNewPasswordScheme":"Schéma de hashage dynamique pour la création de mots de passe",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Mot de passe",
|
||||
"dbiPasswordMailCol":"Champ mail",
|
||||
"dbiSchema":"Schéma",
|
||||
"dbiUserChain":"Chaîne",
|
||||
"dbiUserPassword":"Mot de passe",
|
||||
"dbiUserTable":"Table des utilisateurs",
|
||||
"dbiUserUser":"Utilisateur",
|
||||
"decryptValue":"Déchiffrement",
|
||||
"decryptValueFunctions":"Fonctions de déchiffrement",
|
||||
"decryptValueRule":"Règle d'utilisation",
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Utente",
|
||||
"dbiAuthnLevel":"Livello di autenticazione",
|
||||
"dbiConnection":"Connessione",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"hashing dinamico",
|
||||
"dbiDynamicHashEnabled":"attivazione hash dinamica",
|
||||
"dbiDynamicHashNewPasswordScheme":"Schema hash dinamico per nuove password",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Password",
|
||||
"dbiPasswordMailCol":"Nome del campo di posta",
|
||||
"dbiSchema":"Schema",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"Tabella utente",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Decrypt functions",
|
||||
"decryptValueRule":"Utilizza la regola",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"URL del servizio",
|
||||
"yubikey2fUserCanRemoveKey":"Autorizza l'utente a rimuovere la Yubikey",
|
||||
"zeroConfExplanations":"Il server non ha alcuna configurazione. Utilizza il modello per salvare il primo."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Użytkownik",
|
||||
"dbiAuthnLevel":"Poziom uwierzytelnienia",
|
||||
"dbiConnection":"Połączenie",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dynamiczne haszowanie",
|
||||
"dbiDynamicHashEnabled":"aktywacja dynamicznego haszowania",
|
||||
"dbiDynamicHashNewPasswordScheme":"Dynamiczny schemat haszowania dla nowych haseł",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Hasło",
|
||||
"dbiPasswordMailCol":"Nazwa pola poczty",
|
||||
"dbiSchema":"Schemat",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"Tabela użytkowników",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Odszyfruj wartość",
|
||||
"decryptValueFunctions":"Odszyfruj funkcje",
|
||||
"decryptValueRule":"Użyj reguły",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"URL usługi",
|
||||
"yubikey2fUserCanRemoveKey":"Pozwól użytkownikowi usunąć Yubikey",
|
||||
"zeroConfExplanations":"Serwer nie ma konfiguracji. Użyj szablonu, aby zapisać pierwszy."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Kullanıcı",
|
||||
"dbiAuthnLevel":"Doğrulama seviyesi",
|
||||
"dbiConnection":"Bağlantı",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dinamik çırpma",
|
||||
"dbiDynamicHashEnabled":"dinamik çırpı aktivasyonu",
|
||||
"dbiDynamicHashNewPasswordScheme":"Yeni parolalar için dinamik çırpı şeması",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Parola",
|
||||
"dbiPasswordMailCol":"E-posta alanı adı",
|
||||
"dbiSchema":"Şema",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"Kullanıcı tablosu",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Değeri çöz",
|
||||
"decryptValueFunctions":"Fonksiyonları çöz",
|
||||
"decryptValueRule":"Kuralı kullan",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"Servis URL'si",
|
||||
"yubikey2fUserCanRemoveKey":"Yubikey'i kaldırmak için kullanıcıya izin ver",
|
||||
"zeroConfExplanations":"Sunucunun yapılandırması yok. Şimdi bir tane kaydetmek için şablonu kullanın."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"Người dùng",
|
||||
"dbiAuthnLevel":"Mức xác thực",
|
||||
"dbiConnection":"Kết nối",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dynamic hashing",
|
||||
"dbiDynamicHashEnabled":"dynamic hash activation",
|
||||
"dbiDynamicHashNewPasswordScheme":"Dynamic hash scheme for new passwords",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"Mật khẩu",
|
||||
"dbiPasswordMailCol":"Tên trường thư",
|
||||
"dbiSchema":"Giản đồ",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"Bảng người dùng",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Decrypt functions",
|
||||
"decryptValueRule":"Quy tắc sử dụng",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"Dịch vụ URL",
|
||||
"yubikey2fUserCanRemoveKey":"Allow user to remove Yubikey",
|
||||
"zeroConfExplanations":"Máy chủ không có cấu hình. Sử dụng mẫu để lưu đầu tiên. "
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"用户",
|
||||
"dbiAuthnLevel":"认证等级",
|
||||
"dbiConnection":"连接",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"dynamic hashing",
|
||||
"dbiDynamicHashEnabled":"dynamic hash activation",
|
||||
"dbiDynamicHashNewPasswordScheme":"Dynamic hash scheme for new passwords",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"密码",
|
||||
"dbiPasswordMailCol":"Mail field name",
|
||||
"dbiSchema":"Schema",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"用户表",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"Decrypt value",
|
||||
"decryptValueFunctions":"Decrypt functions",
|
||||
"decryptValueRule":"Use rule",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"Service URL",
|
||||
"yubikey2fUserCanRemoveKey":"Allow user to remove Yubikey",
|
||||
"zeroConfExplanations":"Server has no configuration. Use template to save the first."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -286,6 +286,8 @@
|
|||
"dbiAuthUser":"使用者",
|
||||
"dbiAuthnLevel":"驗證等級",
|
||||
"dbiConnection":"連線",
|
||||
"dbiConnectionAuth":"Authentication process",
|
||||
"dbiConnectionUser":"User process",
|
||||
"dbiDynamicHash":"動態雜湊值",
|
||||
"dbiDynamicHashEnabled":"動態雜湊值啟用",
|
||||
"dbiDynamicHashNewPasswordScheme":"新密碼的動態雜湊值結構",
|
||||
|
@ -296,7 +298,10 @@
|
|||
"dbiPassword":"密碼",
|
||||
"dbiPasswordMailCol":"郵件欄位名稱",
|
||||
"dbiSchema":"結構",
|
||||
"dbiUserChain":"Chain",
|
||||
"dbiUserPassword":"Password",
|
||||
"dbiUserTable":"使用者表格",
|
||||
"dbiUserUser":"User",
|
||||
"decryptValue":"解密值",
|
||||
"decryptValueFunctions":"解密函式",
|
||||
"decryptValueRule":"使用規則",
|
||||
|
@ -1212,4 +1217,4 @@
|
|||
"yubikey2fUrl":"服務 URL",
|
||||
"yubikey2fUserCanRemoveKey":"允許使用者移除 Yubikey",
|
||||
"zeroConfExplanations":"伺服器未設定。使用飯本來儲存第一個。"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ use JSON;
|
|||
use strict;
|
||||
require 't/test-lib.pm';
|
||||
|
||||
my $tests = 17;
|
||||
my $tests = 18;
|
||||
|
||||
use_ok('Lemonldap::NG::Common::Cli');
|
||||
use_ok('Lemonldap::NG::Manager::Cli');
|
||||
|
@ -77,6 +77,14 @@ combined_like(
|
|||
'"Force cfgNum" OK'
|
||||
);
|
||||
|
||||
# Test 'set' command with nohistory
|
||||
@cmd = qw(-yes 1 -force 1 -nohistory 1 set cookieName test);
|
||||
combined_like(
|
||||
sub { llclient->run(@cmd) },
|
||||
qr#cfgNum forced with 6#s,
|
||||
'"Force cfgNum" OK'
|
||||
);
|
||||
|
||||
# Test 'info' command with force
|
||||
@cmd = qw(info);
|
||||
combined_like(
|
||||
|
|
|
@ -118,7 +118,8 @@ sub getNodes {
|
|||
my @res;
|
||||
foreach my $k (@$tree) {
|
||||
if ( ref($k) ) {
|
||||
push @res, $k->{title}, @{ getNodes( $k->{nodes} ) };
|
||||
push @res, $k->{title}, @{ getNodes( $k->{nodes} ) },
|
||||
@{ getNodes( $k->{nodes_cond} ) };
|
||||
}
|
||||
else {
|
||||
push @res, $k;
|
||||
|
|
|
@ -440,6 +440,74 @@ sub display {
|
|||
else {
|
||||
my $form = $self->_authentication->getForm($req);
|
||||
$filter->{LOGIN_FORM} = $form;
|
||||
|
||||
# TODO
|
||||
# START "MAY BE BROKEN"
|
||||
my $plugin =
|
||||
$self->loadedModules->{
|
||||
"Lemonldap::NG::Portal::Plugins::FindUser"};
|
||||
my $fields = [];
|
||||
if ( $plugin
|
||||
&& $self->conf->{findUser}
|
||||
&& $self->conf->{impersonationRule}
|
||||
&& $self->conf->{findUserSearchingAttributes} )
|
||||
{
|
||||
$login = $req->data->{findUser};
|
||||
$fields = $plugin->buildForm();
|
||||
}
|
||||
|
||||
# Authentication loop
|
||||
if ( $self->conf->{authentication} eq 'Choice' )
|
||||
# and my $authLoop = $self->_buildAuthLoop($req) )
|
||||
{
|
||||
%templateParams = (
|
||||
%templateParams,
|
||||
CHOICE_PARAM => $self->conf->{authChoiceParam},
|
||||
CHOICE_VALUE => $req->data->{_authChoice},
|
||||
DISPLAY_TAB => scalar( $req->param("tab") ),
|
||||
DISPLAY_FORM => 0,
|
||||
DISPLAY_OPENID_FORM => 0,
|
||||
DISPLAY_YUBIKEY_FORM => 0,
|
||||
DISPLAY_FINDUSER => scalar @$fields,
|
||||
FIELDS => $fields,
|
||||
SPOOFID => $login
|
||||
);
|
||||
}
|
||||
|
||||
# Choose what form to display if not in a loop
|
||||
else {
|
||||
|
||||
my $displayType =
|
||||
eval { $self->_authentication->getDisplayType($req) }
|
||||
|| 'logo';
|
||||
|
||||
$self->logger->debug("Display type $displayType");
|
||||
|
||||
%templateParams = (
|
||||
%templateParams,
|
||||
DISPLAY_FORM => $displayType =~ /\bstandardform\b/ ? 1
|
||||
: 0,
|
||||
DISPLAY_OPENID_FORM => $displayType =~ /\bopenidform\b/ ? 1
|
||||
: 0,
|
||||
DISPLAY_YUBIKEY_FORM => $displayType =~ /\byubikeyform\b/
|
||||
? 1
|
||||
: 0,
|
||||
DISPLAY_SSL_FORM => $displayType =~ /sslform/ ? 1 : 0,
|
||||
DISPLAY_GPG_FORM => $displayType =~ /gpgform/ ? 1 : 0,
|
||||
DISPLAY_LOGO_FORM => $displayType eq "logo" ? 1 : 0,
|
||||
DISPLAY_FINDUSER => scalar @$fields,
|
||||
module => $displayType eq "logo"
|
||||
? $self->getModule( $req, 'auth' )
|
||||
: "",
|
||||
AUTH_LOOP => [],
|
||||
PORTAL_URL =>
|
||||
( $displayType eq "logo" ? $self->conf->{portal} : 0 ),
|
||||
MSG => $req->info(),
|
||||
FIELDS => $fields,
|
||||
SPOOFID => $login
|
||||
);
|
||||
}
|
||||
# END "MAY BE BROKEN"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<TMPL_IF NAME="DISPLAY_FINDUSER">
|
||||
|
||||
<div id="finduserModal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
|
@ -50,4 +51,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</TMPL_IF>
|
||||
</TMPL_IF>
|
||||
|
|
Loading…
Reference in New Issue