Help in "General Parameters".
This commit is contained in:
parent
91844e41be
commit
391b0dffec
|
@ -2,6 +2,7 @@ Revision history for Perl extension Lemonldap::NG::Manager.
|
|||
|
||||
0.41 Sun Jan 14 14:04:05 2007
|
||||
- I18n in javascripts (close #306564 / forge.objectweb.org)
|
||||
- Increase number of help chapter (General Parameters)
|
||||
|
||||
0.4 Sat Jan 13 20:23:18 2007
|
||||
- New configuration parameter named 'macros'. It can be used to
|
||||
|
|
|
@ -120,38 +120,38 @@ sub printXmlConf {
|
|||
item => {
|
||||
id => 'root',
|
||||
open => 1,
|
||||
text => &configuration . " $config->{cfgNum}",
|
||||
text => &txt_configuration . " $config->{cfgNum}",
|
||||
item => {
|
||||
generalParameters => {
|
||||
text => &generalParameters,
|
||||
text => &txt_generalParameters,
|
||||
item => {
|
||||
exportedVars => {
|
||||
text => &exportedVars,
|
||||
text => &txt_exportedVars,
|
||||
item => {},
|
||||
},
|
||||
macros => {
|
||||
text => ¯os,
|
||||
text => &txt_macros,
|
||||
},
|
||||
ldapParameters => {
|
||||
text => &ldapParameters,
|
||||
text => &txt_ldapParameters,
|
||||
item => {},
|
||||
},
|
||||
sessionStorage => {
|
||||
text => &sessionStorage,
|
||||
text => &txt_sessionStorage,
|
||||
item => {
|
||||
globalStorageOptions =>
|
||||
{ text => &globalStorageOptions, }
|
||||
{ text => &txt_globalStorageOptions, }
|
||||
},
|
||||
},
|
||||
authParams => {
|
||||
text => &authParams,
|
||||
text => &txt_authParams,
|
||||
item => {},
|
||||
},
|
||||
},
|
||||
},
|
||||
groups => { text => &userGroups, },
|
||||
groups => { text => &txt_userGroups, },
|
||||
virtualHosts => {
|
||||
text => &virtualHosts,
|
||||
text => &txt_virtualHosts,
|
||||
open => 1,
|
||||
},
|
||||
},
|
||||
|
@ -170,37 +170,37 @@ sub printXmlConf {
|
|||
$tree->{item}->{item}->{generalParameters}->{item}->{authParams}->{item};
|
||||
$authParams->{authentication} =
|
||||
$self->xmlField( "value", $config->{authentication} || 'ldap',
|
||||
&authenticationType, );
|
||||
&txt_authenticationType, );
|
||||
$authParams->{portal} =
|
||||
$self->xmlField( "value", $config->{portal} || 'http://portal/',
|
||||
"Portail" );
|
||||
$authParams->{securedCookie} =
|
||||
$self->xmlField( "value", $config->{securedCookie} || 0, &securedCookie,
|
||||
$self->xmlField( "value", $config->{securedCookie} || 0, &txt_securedCookie,
|
||||
);
|
||||
|
||||
$generalParameters->{domain} =
|
||||
$self->xmlField( "value", $config->{domain} || 'example.com', &domain, );
|
||||
$self->xmlField( "value", $config->{domain} || 'example.com', &txt_domain, );
|
||||
$generalParameters->{cookieName} =
|
||||
$self->xmlField( "value", $config->{cookieName} || 'lemonldap',
|
||||
&cookieName, );
|
||||
&txt_cookieName, );
|
||||
|
||||
$sessionStorage->{globalStorage} =
|
||||
$self->xmlField( "value",
|
||||
$config->{globalStorage} || 'Apache::Session::File',
|
||||
&apacheSessionModule, );
|
||||
&txt_apacheSessionModule, );
|
||||
|
||||
$ldapParameters->{ldapServer} =
|
||||
$self->xmlField( "value", $config->{ldapServer} || 'localhost',
|
||||
&ldapServer, );
|
||||
&txt_ldapServer, );
|
||||
$ldapParameters->{ldapPort} =
|
||||
$self->xmlField( "value", $config->{ldapPort} || 389, &ldapPort, );
|
||||
$self->xmlField( "value", $config->{ldapPort} || 389, &txt_ldapPort, );
|
||||
$ldapParameters->{ldapBase} =
|
||||
$self->xmlField( "value", $config->{ldapBase} || ' ', &ldapBase, );
|
||||
$self->xmlField( "value", $config->{ldapBase} || ' ', &txt_ldapBase, );
|
||||
$ldapParameters->{managerDn} =
|
||||
$self->xmlField( "value", $config->{managerDn} || ' ', &managerDn, );
|
||||
$self->xmlField( "value", $config->{managerDn} || ' ', &txt_managerDn, );
|
||||
$ldapParameters->{managerPassword} =
|
||||
$self->xmlField( "value", $config->{managerPassword} || ' ',
|
||||
&managerPassword, );
|
||||
&txt_managerPassword, );
|
||||
|
||||
if ( $config->{exportedVars} ) {
|
||||
while ( my ( $n, $att ) = each( %{ $config->{exportedVars} } ) ) {
|
||||
|
@ -234,8 +234,8 @@ sub printXmlConf {
|
|||
my ( $ih, $ir ) =
|
||||
( "exportedHeaders_$indice", "locationRules_$indice" );
|
||||
$virtualHost->{$host}->{item} = {
|
||||
"$ih" => { text => &httpHeaders, },
|
||||
"$ir" => { text => &locationRules, },
|
||||
"$ih" => { text => &txt_httpHeaders, },
|
||||
"$ir" => { text => &txt_locationRules, },
|
||||
};
|
||||
while ( my ( $reg, $expr ) = each(%$rules) ) {
|
||||
my $type = ( $reg eq 'default' ) ? 'value' : 'both';
|
||||
|
|
|
@ -2,7 +2,7 @@ package Lemonldap::NG::Manager::Help;
|
|||
|
||||
use AutoLoader qw(AUTOLOAD);
|
||||
use UNIVERSAL qw(can);
|
||||
our $VERSION = '0.21';
|
||||
our $VERSION = '0.3';
|
||||
|
||||
sub import {
|
||||
my ($caller_package) = caller;
|
||||
|
@ -18,7 +18,8 @@ sub import {
|
|||
}
|
||||
}
|
||||
$l ||= "en";
|
||||
foreach $h (qw(virtualHosts groups ldap vars storage macros)) {
|
||||
foreach $h (qw(virtualHosts groups ldap vars storage macros authParams
|
||||
cookieName domain)) {
|
||||
*{"${caller_package}::help_$h"} = \&{"help_${h}_$l"};
|
||||
}
|
||||
}
|
||||
|
@ -31,65 +32,132 @@ __END__
|
|||
sub help_virtualHosts_en {
|
||||
print <<EOT;
|
||||
<h3>Virtual Hosts</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_macros_en {
|
||||
print <<EOT;
|
||||
<h3>User Groups</h3>
|
||||
<h3>Macros</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_groups_en {
|
||||
print <<EOT;
|
||||
<h3>User Groups</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_ldap_en {
|
||||
print <<EOT;
|
||||
<h3>LDAP Parameters</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_vars_en {
|
||||
print <<EOT;
|
||||
<h3>Variables (LDAP attributes)</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_storage_en {
|
||||
print <<EOT;
|
||||
<h3>Sessions Storage</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_authParams_en {
|
||||
print <<EOT;
|
||||
<h3>Authentication Parameters</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_cookieName_en {
|
||||
print <<EOT;
|
||||
<h3>Cookie Name</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_domain_en {
|
||||
print <<EOT;
|
||||
<h3>Protected domain</h3>
|
||||
This help chapter does not exist in english. If you want to help us, you can
|
||||
edit lib/Lemonldap/NG/Manager/Help.pm in lemonldap-ng source tree and send us
|
||||
your contribution.<br>
|
||||
Thanks.
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_virtualHosts_fr {
|
||||
print <<EOT;
|
||||
<h3>Hôtes virtuels</h3>
|
||||
|
||||
<p> La configuration d'un hôte virtuel est divisée en 2 parties : les
|
||||
règles et les en-têtes HTTP exportés.
|
||||
règles et les en-têtes HTTP exportés.</p>
|
||||
|
||||
<p> <u>Note</u> : pour que le mécanisme d'authentification fonctionne, tous
|
||||
les hôtes virtuels et le portail doivent se trouver dans le domaine déclaré
|
||||
dans les paramètres généraux.</p>
|
||||
|
||||
<h4> Règles</h4>
|
||||
|
||||
<p>Une règle associe une expression régulière perl à une expression booléenne.
|
||||
Lors de l'accès d'un utilisateur, si l'URL demandée correspond à la règle, le
|
||||
droit d'accès est calculé par l'expression booléenne. Exemple :</p>
|
||||
|
||||
<pre>
|
||||
# Hôte virtuel test.example.com - règles
|
||||
^/protected => \$groups =~ /\\bgroup1\\b/
|
||||
</pre>
|
||||
|
||||
<p> La règle ci-dessus signifie que pour les URL commençant par '/protected',
|
||||
les utilisateurs doivent appartenir au groupe 'group1'. Vous pouvez également
|
||||
utiliser les mots-clefs 'accept' et 'deny'. Attention, 'accept' signifie que
|
||||
tous les utilisateurs authentifiés peuvent accéder.</p>
|
||||
|
||||
<p>Si l'URL demandée ne correspond à aucune des expressions régulières, le
|
||||
droit d'accès est calculé à partir de l'expression booléenne définie dans
|
||||
la règle par défaut (default).</p>
|
||||
|
||||
<h4> En-têtes</h4>
|
||||
|
||||
<p> Les en-têtes servant à l'application à savoir qui est connecté se déclarent
|
||||
comme suit : <tt><nom de l'en-tête> => <expression Perl>.
|
||||
</p>
|
||||
|
||||
<p> Exemples :</p>
|
||||
|
||||
<pre>
|
||||
Auth-User => \$uid
|
||||
Unite => \$departmentUID
|
||||
|
@ -216,3 +284,44 @@ indiquer les paramètres correspondants à ce module :</p>
|
|||
EOT
|
||||
}
|
||||
|
||||
sub help_authParams_fr {
|
||||
print <<EOT;
|
||||
<h3>Paramètres d'authentification</h3>
|
||||
<dl>
|
||||
<dt> Type d'authentfication </dt>
|
||||
<dd> Le schéma classique d'authentification Lemonldap consiste à utiliser une
|
||||
authentification par LDAP. Vous pouvez changer ceci en ssl par exemple.</dd>
|
||||
|
||||
<dt> Portail </dt>
|
||||
<dd> Indiquez ici l'URL ou seront renvoyés les utilisateurs non authentifiés.
|
||||
Cette URL doit bien sur correspondre à un portail utilisant
|
||||
Lemonldap::NG::Portal::SharedConf.</dd>
|
||||
|
||||
<dt> Cookie sécurisé (SSL) </dt>
|
||||
<dd> Une fois authentifié, l'utilisateur est reconnu par son cookie. Si tous
|
||||
les hôtes virtuels de votre domaine son protégés par SSL, mettez cette option
|
||||
à 1, ainsi le cookie ne sera présenté par le navigateur qu'aux sites protégés,
|
||||
ce qui évite un vol de session.
|
||||
</dl>
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_cookieName_fr {
|
||||
print <<EOT;
|
||||
<h3>Nom de cookie</h3>
|
||||
<p> Indiquez ici le nom du cookie ('lemonldap' par défaut).<br>
|
||||
|
||||
ATTENTION, tout changement nécessite le redémarrage de tous les serveurs Apache
|
||||
hébergeant des agents de protection Lemonldap::NG::Handler.</p>
|
||||
EOT
|
||||
}
|
||||
|
||||
sub help_domain_fr {
|
||||
print <<EOT;
|
||||
<h3>Domaine protégé</h3>
|
||||
<p> Indiquez ici le nom du domaine (ou du sous-domaine) contenant vos
|
||||
applications à protéger.<br>
|
||||
ATTENTION : tous les hôtes virtuels protégés ainsi que le portail
|
||||
d'authentification doivent se trouver dans ce domaine.
|
||||
EOT
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ package Lemonldap::NG::Manager::_HTML;
|
|||
|
||||
use AutoLoader qw(AUTOLOAD);
|
||||
require Lemonldap::NG::Manager::_i18n;
|
||||
our $VERSION = '0.1';
|
||||
our $VERSION = '0.11';
|
||||
|
||||
1;
|
||||
__END__
|
||||
|
@ -74,7 +74,7 @@ sub javascript {
|
|||
foreach(qw(newVirtualHost newMacro newGroup newVar newGSOpt saveConf
|
||||
deleteNode locationRules unableToSave confSaved saveFailure
|
||||
newRule newHeader)) {
|
||||
$text{$_} = &$_;
|
||||
$text{$_} = &{"txt_$_"};
|
||||
}
|
||||
print <<EOT;
|
||||
var s3,s32;
|
||||
|
@ -159,6 +159,15 @@ function onNodeSelect(nodeId) {
|
|||
}
|
||||
help('storage');
|
||||
}
|
||||
else if(nodeIs(nodeId,'authParams')){
|
||||
help('authParams');
|
||||
}
|
||||
else if(nodeIs(nodeId,'cookieName')){
|
||||
help('cookieName');
|
||||
}
|
||||
else if(nodeIs(nodeId,'domain')){
|
||||
help('domain');
|
||||
}
|
||||
}
|
||||
if(tree.getUserData(nodeId,"modif")=='both') but+=button('$text{deleteNode}','deleteNode',nodeId);
|
||||
but+=button('$text{saveConf}','saveConf');
|
||||
|
|
|
@ -18,7 +18,7 @@ sub import {
|
|||
}
|
||||
$functions ||= &en;
|
||||
while ( my ( $f, $v ) = each(%$functions) ) {
|
||||
*{"${caller_package}::$f"} = sub { $v };
|
||||
*{"${caller_package}::txt_$f"} = sub { $v };
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue