LEMONLDAP::NG : * Bug corrections issued from test in real life

environments/ppa-mbqj77/deployments/1
Xavier Guimard 18 years ago
parent 8807ddea7e
commit 7d08f0b475
  1. 3
      modules/lemonldap-ng-handler/Changes
  2. 7
      modules/lemonldap-ng-handler/META.yml
  3. 2
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler.pm
  4. 6
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Proxy.pm
  5. 11
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm
  6. 4
      modules/lemonldap-ng-manager/Changes
  7. 6
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
  8. 2
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/DBI.pm
  9. 46
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Help.pm
  10. 65
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_HTML.pm
  11. 6
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm
  12. 2
      modules/lemonldap-ng-manager/scripts/lmConfig_File2MySQL
  13. 6
      modules/lemonldap-ng-portal/META.yml

@ -1,5 +1,8 @@
Revision history for Perl extension Lemonldap::NG::Handler.
0.76 Fri Mar 9 7:14:42 2007
- little bug correction
0.75 Sat Feb 24 16:36:56
- Adding cross-domain-authentication support
- local configuration overrides global configuration

@ -1,17 +1,14 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Lemonldap-NG-Handler
version: 0.7
version: 0.75
version_from: lib/Lemonldap/NG/Handler.pm
installdirs: site
requires:
Apache::Session: 0
Cache::Cache: 0
DBI: 0
Exporter: 0
Lemonldap::NG::Manager: 0.03
Lemonldap::NG::Manager: 0.4
LWP::UserAgent: 0
MIME::Base64: 0
distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.30_01

@ -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.75";
our $VERSION = "0.76";
1;

@ -44,6 +44,12 @@ sub run($$) {
( $class, $r ) = @_;
my $url = $r->uri;
$url .= "?" . $r->args if ( $r->args );
# Uncomment this if you have lost of session problem with SAP.
# I don't know why cookie value and URL parameter differs but it causes
# this problem. By removing URL parameters, all works fine. SAP bug ?
# $url =~ s/sap-wd-cltwndid=[^\&]+//g;
return DECLINED unless ( $base = $r->dir_config('LmProxyPass') );
my $request = new HTTP::Request( $r->method, $base . $url );

@ -9,7 +9,7 @@ use Cache::Cache qw($EXPIRES_NEVER);
our @ISA = qw(Lemonldap::NG::Handler::Vhost Lemonldap::NG::Handler::Simple);
our $VERSION = '0.52';
our $VERSION = '0.53';
our $cfgNum = 0;
our $lastReload = 0;
our $reloadTime;
@ -22,11 +22,12 @@ BEGIN {
eval {
require threads::shared;
Apache2::compat->import();
threads::shared::share($cfgNum);
threads::shared::share($lastReload);
threads::shared::share($reloadTime);
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($childLock);
threads::shared::share($lmConf);
threads::shared::share($localConfig);
};
}
*EXPORT_TAGS = *Lemonldap::NG::Handler::Simple::EXPORT_TAGS;

@ -1,5 +1,9 @@
Revision history for Perl extension Lemonldap::NG::Manager.
0.51 Fri Mar 9 7:16:42
- Bug corrections issued from test in real life.
- More help in english
0.45 Sat Mar 3 9:26:08 2007
- New error system when uploading conf
- Verification if configuration has changed before saving

@ -13,7 +13,7 @@ use LWP::UserAgent;
our @ISA = qw(Lemonldap::NG::Manager::Base);
our $VERSION = '0.5';
our $VERSION = '0.51';
sub new {
my ( $class, $args ) = @_;
@ -72,7 +72,7 @@ sub print_css {
sub print_libjs {
my $self = shift;
print $self->header_public( $self->{jsFile},
print $self->header( $self->{jsFile},
-type => 'application/x-javascript' );
open F, $self->{jsFile};
while (<F>) {
@ -370,7 +370,7 @@ sub upload {
each( %{ $tree->{generalParameters}->{exportedVars} } ) )
{
next unless ( ref($h) );
$config->{exportedVars}->{$v} = $h->{value};
$config->{exportedVars}->{$h->{text}} = $h->{value};
}
return $self->config->saveConf($config);
}

@ -97,7 +97,7 @@ sub store {
sub load {
my ( $self, $cfgNum, $fields ) = @_;
$fields = join( /,/, @$fields ) || '*';
$fields = $fields ? join( /,/, @$fields ) : '*';
my $row =
$self->dbh->selectrow_hashref(
"SELECT $fields from " . $self->{dbiTable} . " WHERE cfgNum=$cfgNum" );

@ -34,10 +34,45 @@ __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.
<p> A virtual host configuration is cutted in 2 pieces&nbsp;: the rules and the HTTP
headers.</p>
<p> <u>Note</u> : If portal and handlers are not in the same domain than declared
in "General Parameters" menu, <u>you have to use</u> CDA modules. Else, session
cookie is not seen by handlers.
<h4> Rules </h4>
<p> A rule associates a regular expression with a perl boolean expression.
When a user tries to access to an URL that match with the regular expression,
access is granted or not depending on the boolean expression result&nbsp;:</p>
<pre>
# Virtual host test.example.com - rules
^/protected =&gt; \$groups =~ /\\bgroup1\\b/
</pre>
<p> This rule means that all URL starting with '/protected', are reserved to
users member of 'group1'. You can also use 'accept' and 'deny' keywords.
'accept' keyword means that all authenticated users are granted.</p>
<p> If URL doesn't match any regular expression, 'default' rule is called to
grant or not.</p>
<h4> Headers </h4>
<p> Headers are used to inform the remote application on the connected user.
They are declared as&nbsp;:
<tt>&lt;Header Name&gt;&nbsp;=&gt;&nbsp;&lt;Perl expression&gt;.
</p>
<p> Examples :</p>
<pre>
Auth-User =&gt; \$uid
Unite =&gt; \$departmentUID
</pre>
EOT
}
@ -130,7 +165,8 @@ r&egrave;gles et les en-t&ecirc;tes HTTP export&eacute;s.</p>
<p> <u>Note</u> : pour que le m&eacute;canisme d'authentification fonctionne, tous
les h&ocirc;tes virtuels et le portail doivent se trouver dans le domaine d&eacute;clar&eacute;
dans les param&egrave;tres g&eacute;n&eacute;raux.</p>
dans les param&egrave;tres g&eacute;n&eacute;raux ou <u>utiliser les modules CDA</u>
<i>(Cross-Domain-Authentication)</i> qui gère la transmission de l'identifiant.</p>
<h4> R&egrave;gles</h4>

@ -8,7 +8,7 @@ use AutoLoader qw(AUTOLOAD);
require Lemonldap::NG::Manager::_i18n;
use Lemonldap::NG::Manager::Conf::Constants;
our $VERSION = '0.22';
our $VERSION = '0.23';
1;
__END__
@ -77,35 +77,41 @@ sub javascript {
deleteNode locationRules unableToSave confSaved saveFailure
newRule newHeader httpHeaders waitingResult unknownError
configurationWasChanged configLoaded warningConfNotApplied
applyConf )) {
applyConf prevConf lastConf nextConf)) {
$text{$_} = &{"txt_$_"};
$text{$_} =~s/'/\\'/g;
}
print qq#
function loadConf() {
document.body.style.cursor='wait';
tree.setXMLAutoLoading("$ENV{SCRIPT_NAME}?lmQuery=conf");
tree.loadXML("$ENV{SCRIPT_NAME}?lmQuery=conf");
tree.setOnClickHandler(onNodeSelect);
tree.selectItem('virtualHosts',true,false);
document.getElementById('help').innerHTML='<h3>$text{configLoaded}</h3>';
window.setTimeout("document.body.style.cursor='auto'",1000);
}
var s3,s32;
window.onload=function(){
var w=X.clientWidth()-12;
var h=X.clientHeight()-12;
//var h=window.outerHeight;
s32=new xSplitter('idSplitter32',0,0,0,0,false,4,3*h/4,h/8,true,0);
s3=new xSplitter('idSplitter3',0,0,w,h,true,4,w/4,w/8,true,4,null,s32);
X.addEventListener(window,'resize',win_onresize,false);
document.body.style.cursor='wait';
document.getElementById('help').innerHTML='<h3>$text{waitingResult}</h3>';
tree=new dhtmlXTreeObject(document.getElementById('treeBox'),"100%","100%",0);
tree.setImagePath("$self->{dhtmlXTreeImageLocation}");
tree.setXMLAutoLoading("$ENV{SCRIPT_NAME}?lmQuery=conf");
tree.loadXML("$ENV{SCRIPT_NAME}?lmQuery=conf");
tree.setOnClickHandler(onNodeSelect);
document.getElementById('help').innerHTML='<h3>$text{configLoaded}</h3>';
window.setTimeout("document.body.style.cursor='auto'",1000);
var w=X.clientWidth()-12;
var h=X.clientHeight()-12;
//var h=window.outerHeight;
s32=new xSplitter('idSplitter32',0,0,0,0,false,4,3*h/4,h/8,true,0);
s3=new xSplitter('idSplitter3',0,0,w,h,true,4,w/4,w/8,true,4,null,s32);
X.addEventListener(window,'resize',win_onresize,false);
document.getElementById('help').innerHTML='<h3>$text{waitingResult}</h3>';
tree=new dhtmlXTreeObject(document.getElementById('treeBox'),"100%","100%",0);
tree.setImagePath("$self->{dhtmlXTreeImageLocation}");
loadConf();
};
function win_onresize(){
var cw=X.clientWidth();
var w=X.clientWidth()-12;
var h=X.clientHeight()-12;
s3.paint(w,h,w/4,w/5);
var cw=X.clientWidth();
var w=X.clientWidth()-12;
var h=X.clientHeight()-12;
s3.paint(w,h,w/4,w/5);
}
var indice=-1;
@ -177,10 +183,13 @@ function onNodeSelect(nodeId) {
}
}
if(tree.getUserData(nodeId,"modif")=='both') but+=button('$text{deleteNode}','deleteNode',nodeId);
but+=button('$text{saveConf}','saveConf');
but+=button('$text{saveConf}','saveConf',nodeId);
if(nodeId == 'root') but+=button('$text{prevConf}','prevConf',nodeId)
+button('$text{nextConf}','nextConf',nodeId)
+button('$text{lastConf}','lastConf',nodeId);
#;
if( $self->{applyConfFile} ) {
print "but+=button('$text{applyConf}','applyConf');";
print "but+=button('$text{applyConf}','applyConf',nodeId);";
}
print qq#
document.getElementById('buttons').innerHTML = but;
@ -235,7 +244,7 @@ function newValue(id,text,type,value){
function newRule(id){
var lr=tree.getItemIdByIndex(vhostId(id),1);
newValue(lr,'New rule','both','deny');
newValue(lr,'^/New/rule','both','deny');
}
function newHeader(id){
@ -244,19 +253,19 @@ function newHeader(id){
}
function newGroup(id){
newValue('groups','New-group','both','');
newValue('groups','NewGroup','both','');
}
function newMacro(id){
newValue('macros','newMacro','both','');
newValue('macros','NewMacro','both','');
}
function newVar(id){
newValue('exportedVars','New-var','both','uid');
newValue('exportedVars','NewVar','both','uid');
}
function newGSOpt(id){
newValue('globalStorageOptions','New-Opt','both','');
newValue('globalStorageOptions','NewOpt','both','');
}
function deleteNode(id){

@ -81,6 +81,9 @@ sub fr {
error => 'Erreur',
result => 'R&eacute;sultat',
changesAppliedLater => "Changements seront actif d'ici 10 minutes'",
prevConf => 'Pr&eacute;c&eacute;dente',
nextConf => 'Suivante',
lastConf => 'Derni&egrave;re',
};
}
@ -132,5 +135,8 @@ sub en {
error => 'Error',
result => 'Result',
changesAppliedLater => 'Changes will be effective within 10 minutes',
prevConf => 'Previous',
nextConf => 'Next',
lastConf => 'Last',
};
}

@ -6,7 +6,7 @@ use strict;
# Get ARGS
my %opts;
getopts( 'cau:p:t:', \%opts );
getopts( 'ct:', \%opts );
usage("configuration file required")

@ -1,15 +1,13 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Lemonldap-NG-Portal
version: 0.5
version: 0.63
version_from: lib/Lemonldap/NG/Portal.pm
installdirs: site
requires:
Apache::Session: 0
CGI: 3.08
DBI: 0
Lemonldap::NG::Manager: 0.03
MIME::Base64: 0
Lemonldap::NG::Manager: 0.4
Net::LDAP: 0
distribution_type: module

Loading…
Cancel
Save