Commit 60e18350 authored by Xavier Guimard's avatar Xavier Guimard

LEMONLDAP::NG : little bug fix : Active Directory does not set UID, so $whatToTrace may bu null.

parent 89b72726
......@@ -499,7 +499,7 @@ sub run ($$) {
# ACCOUNTING
# 1 - Inform Apache
$apacheRequest->connection->user( $datas->{$whatToTrace} );
$apacheRequest->connection->user( $datas->{$whatToTrace} ) if( $datas->{$whatToTrace} );
# AUTHORIZATION
return $class->forbidden($uri) unless ( $class->grant($uri) );
......
......@@ -191,8 +191,9 @@ sub buildTree {
$self->xmlField( "value", $config->{portal} || 'http://portal/',
"Portail" );
$authParams->{securedCookie} =
$self->xmlField( "value", $config->{securedCookie} || 0, &txt_securedCookie,
);
$self->xmlField( "value", $config->{securedCookie} || 0, &txt_securedCookie );
$generalParameters->{whatToTrace} =
$self->xmlField( "value", $config->{whatToTrace} || '$uid', &txt_whatToTrace );
$generalParameters->{domain} =
$self->xmlField( "value", $config->{domain} || 'example.com', &txt_domain, );
......@@ -353,6 +354,7 @@ sub tree2conf {
}
# General parameters
$config->{cookieName} = $tree->{generalParameters}->{cookieName}->{value};
$config->{whatToTrace} = $tree->{generalParameters}->{whatToTrace}->{value};
$config->{domain} = $tree->{generalParameters}->{domain}->{value};
$config->{globalStorage} = $tree->{generalParameters}->{sessionStorage}->{globalStorage}->{value};
while ( my ( $v, $h ) = each( %{ $tree->{generalParameters}->{sessionStorage}->{globalStorageOptions} })) {
......
......@@ -151,7 +151,7 @@ sub help_authParams_fr {
print <<EOT;
<h3>Param&egrave;tres d'authentification</h3>
<dl>
<dt> Type d'authentfication </dt>
<dt> Type d'authentification </dt>
<dd> Le sch&eacute;ma classique d'authentification Lemonldap consiste &agrave; utiliser une
authentification par LDAP. Vous pouvez changer ceci en ssl par exemple.</dd>
......
......@@ -89,6 +89,7 @@ sub fr {
# Attention: ici, &Ecirc; ne sera pas interprété par Firefox (msgBox)
areYouSure => 'Etes vous sur ?',
syntaxError => 'Erreur de syntaxe, configuration refus&eacute;e. Consultez les journaux du serveur web.',
whatToTrace => "Donn&eacute;e &agrave; inscrire dans les journaux d'Apache",
};
}
......@@ -147,5 +148,6 @@ sub en {
deleteVirtualHost => 'Delete virtual host',
areYouSure => 'Are you sure ?',
syntaxError => 'Syntax error, configuration refused. See web server logs for more.',
whatToTrace => "Attribute to use in Apache's logs",
};
}
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