LEMONLDAP::NG : CPAN versions update and little doc update

This commit is contained in:
Xavier Guimard 2008-08-25 19:54:24 +00:00
parent f5f3e6506a
commit 8364a0e78d
11 changed files with 68 additions and 19 deletions

View File

@ -2,9 +2,11 @@ Changes
example/autoProtectedCGI.pl
example/lmH-apache.conf
example/lmH-apache2.conf
example/menu.pl
example/MyHandler.pm
example/MyHandlerLog4Perl.pm
lib/Lemonldap/NG/Handler.pm
lib/Lemonldap/NG/Handler/AuthBasic.pm
lib/Lemonldap/NG/Handler/CDA.pm
lib/Lemonldap/NG/Handler/CGI.pm
lib/Lemonldap/NG/Handler/Proxy.pm

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Handler;
print STDERR
"See Lemonldap::NG::Handler(3) to know which Lemonldap::NG::Handler::* module to use.";
our $VERSION = "0.88";
our $VERSION = "0.89";
1;

View File

@ -8,7 +8,7 @@ use Safe;
require Data::Dumper;
require POSIX;
our $VERSION = '0.88';
our $VERSION = '0.89';
our %EXPORT_TAGS;

View File

@ -4,7 +4,7 @@ use Lemonldap::NG::Handler::Simple qw(:locationRules :headers);
use strict;
use MIME::Base64;
our $VERSION = '0.52';
our $VERSION = '0.53';
# TODO: split locationRules into 2 arrays
sub locationRulesInit {

View File

@ -19,7 +19,7 @@ example/imgs/iconJob.gif
example/imgs/iconReport.gif
example/imgs/iconTask.gif
example/imgs/iconTimeRecordsEdit.gif
example/imgs/iconUnCheckAll.gif
example/imgs/iconUncheckAll.gif
example/imgs/item.gif
example/imgs/item2.gif
example/imgs/leaf.gif
@ -50,9 +50,9 @@ example/lmConfig.mysql
example/scripts/lmConfigEditor
example/scripts/lmSessionDump
example/soapserver.pl
example/theme/logo_lemonldap-ng.png
example/theme/default.css
example/theme/hatch.gif
example/theme/logo_lemonldap-ng.png
lib/Lemonldap/NG/Manager.pm
lib/Lemonldap/NG/Manager/_HTML.pm
lib/Lemonldap/NG/Manager/_i18n.pm

View File

@ -17,7 +17,7 @@ use MIME::Base64;
our @ISA = qw(Lemonldap::NG::Manager::Base);
our $VERSION = '0.85';
our $VERSION = '0.86';
sub new {
my ( $class, $args ) = @_;

View File

@ -1,7 +1,7 @@
package Lemonldap::NG::Manager::Help;
use AutoLoader qw(AUTOLOAD);
our $VERSION = '0.35';
our $VERSION = '0.36';
sub import {
my ($caller_package) = caller;
@ -300,14 +300,37 @@ This mechanism avoid to do more than one time the same operation in the
authentication phase. Example&nbsp;:</p>
<pre>
# macros
long_name => \$givenname . " " . \$surname
admin => \$uid eq "foo" or \$uid eq "bar"
long_name =&gt; \$givenname . " " . \$surname
admin =&gt; \$uid eq "foo" or \$uid eq "bar"
# test.example.com - Headers
Name => \$long_name
Name =&gt; \$long_name
# test.example.com - Rules
^/admin/ => \$admin
^/admin/ =&gt; \$admin
</pre>
<h4> Tips </h4>
<h5> Redefining LDAP attributes </h5>
<p> You can create a macro with the same name than an exported value. If so,
the attribute is redefined. Example&nbsp;:</p>
<pre>
uid =&gt; $uid . "\\\@domain.com"
</pre>
<h5> Using regexp </h5>
<p> Suppose you want to extract the string 'admin' or 'user' in an attribute,
in Perl, you can use <tt>\$mail&nbsp;=~&nbsp;s/^.*(user|admin)/\$1/</tt>. To
use it in Lemonldap::NG, you have to do the following&nbsp;:</p>
<pre>
mail =&gt; (\$mail =~ /(user|admin)/)[0]
</pre>
<p> Explanation : '\$mail =~ /(user|admin)/' returns 0 or 1, but
'(\$mail =~ /(user|admin)/)' is a "list context" so it returns an array
containing all elements recognized. So '(\$mail =~ /(user|admin)/)[0]'
returns the first element.</p>
EOT
}
@ -321,14 +344,38 @@ Elles &eacute;vitent de r&eacute;p&eacute;ter le m&ecirc;me calcul plusieurs
fois dans la phase d'authentification. Exemple&nbsp;:</p>
<pre>
# macros
nom_complet => \$givenname . " " . \$surname
admin => \$uid eq "foo" or \$uid eq "bar"
nom_complet =&gt; \$givenname . " " . \$surname
admin =&gt; \$uid eq "foo" or \$uid eq "bar"
# test.example.com - En-t&ecirc;tes
Nom => \$nom_complet
Nom =&gt; \$nom_complet
# test.example.com - R&egrave;gles
^/admin/ => \$admin
^/admin/ =&gt; \$admin
</pre>
<h4> Astuces </h4>
<h5> Redéfinir les attributs LDAP </h5>
<p> Une macro peut porter le même nom
You can create a macro with the same name than an exported value. If so,
the attribute is redefined. Example&nbsp;:</p>
<pre>
uid =&gt; $uid . "\\\@domain.com"
</pre>
<h5> Using regexp </h5>
<p> Suppose you want to extract the string 'admin' or 'user' in an attribute,
in Perl, you can use <tt>\$mail&nbsp;=~&nbsp;s/^.*(user|admin)/\$1/</tt>. To
use it in Lemonldap::NG, you have to do the following&nbsp;:</p>
<pre>
mail =&gt; (\$mail =~ /(user|admin)/)[0]
</pre>
<p> Explanation : '\$mail =~ /(user|admin)/' returns 0 or 1, but
'(\$mail =~ /(user|admin)/)' is a "list context" so it returns an array
containing all elements recognized. So '(\$mail =~ /(user|admin)/)[0]'
returns the first element.</p>
EOT
}

View File

@ -8,7 +8,7 @@ use AutoLoader qw(AUTOLOAD);
require Lemonldap::NG::Manager::_i18n;
use Lemonldap::NG::Manager::Conf::Constants;
our $VERSION = '0.30';
our $VERSION = '0.31';
# TODO: Delete buttons in headers and rules if 'read-only'

View File

@ -3,7 +3,7 @@ package Lemonldap::NG::Manager::_i18n;
# Developer warning : this file must be utf8 encoded
use AutoLoader qw(AUTOLOAD);
our $VERSION = '0.32';
our $VERSION = '0.33';
sub import {
my ($caller_package) = caller;

View File

@ -2,7 +2,7 @@ package Lemonldap::NG::Portal;
print STDERR
"See Lemonldap::NG::Portal(3) to know which Lemonldap::NG::Portal::* module to use.";
our $VERSION = "0.84";
our $VERSION = "0.85";
1;

View File

@ -13,7 +13,7 @@ use CGI::Cookie;
require POSIX;
use Lemonldap::NG::Portal::_i18n;
our $VERSION = '0.84';
our $VERSION = '0.85';
our @ISA = qw(CGI Exporter);