2009-12-17 20:20:17 +01:00
|
|
|
## @file
|
|
|
|
# Lemonldap::NG manager main file
|
|
|
|
|
|
|
|
## @class
|
|
|
|
# Lemonldap::NG manager main class
|
2006-12-18 12:32:33 +01:00
|
|
|
package Lemonldap::NG::Manager;
|
|
|
|
|
|
|
|
use strict;
|
2009-12-17 20:20:17 +01:00
|
|
|
use Lemonldap::NG::Handler::CGI qw(:globalStorage :locationRules); #inherits
|
|
|
|
use Lemonldap::NG::Manager::Help; #inherits
|
2006-12-18 12:32:33 +01:00
|
|
|
|
2009-12-13 16:40:33 +01:00
|
|
|
our $VERSION = '0.93';
|
2009-12-11 19:17:00 +01:00
|
|
|
our @ISA = qw(
|
|
|
|
Lemonldap::NG::Handler::CGI
|
|
|
|
Lemonldap::NG::Manager::Downloader
|
|
|
|
Lemonldap::NG::Manager::Uploader
|
|
|
|
Lemonldap::NG::Manager::_Struct
|
|
|
|
Lemonldap::NG::Manager::_i18n
|
|
|
|
);
|
2006-12-18 12:32:33 +01:00
|
|
|
|
2009-12-11 19:17:00 +01:00
|
|
|
BEGIN {
|
|
|
|
*process = *doall;
|
2008-12-11 18:02:02 +01:00
|
|
|
}
|
|
|
|
|
2009-12-17 20:20:17 +01:00
|
|
|
## @cmethod Lemonldap::NG::Manager new(hashRef args)
|
|
|
|
# Class constructor.
|
|
|
|
#@param args hash reference
|
|
|
|
#@return Lemonldap::NG::Manager object
|
2006-12-18 12:32:33 +01:00
|
|
|
sub new {
|
2006-12-23 16:42:58 +01:00
|
|
|
my ( $class, $args ) = @_;
|
2009-12-11 19:17:00 +01:00
|
|
|
my $self = $class->SUPER::new($args)
|
|
|
|
or $class->abort( 'Unable to start ' . __PACKAGE__,
|
|
|
|
'See Apache logs for more' );
|
2009-12-23 10:37:38 +01:00
|
|
|
if ( $self->param('help') ) {
|
2009-12-11 19:17:00 +01:00
|
|
|
print $self->header_public( $ENV{SCRIPT_FILENAME},
|
|
|
|
-type => 'text/html; charset=utf8' );
|
|
|
|
Lemonldap::NG::Manager::Help::import( $self->{language}
|
|
|
|
|| $ENV{HTTP_ACCEPT_LANGUAGE} )
|
|
|
|
unless ( $self->can('help_groups') );
|
|
|
|
my $chap = $self->param('help');
|
|
|
|
eval { no strict "refs"; &{"help_$chap"} };
|
|
|
|
$self->quit();
|
|
|
|
}
|
|
|
|
elsif ( my $rdata = $self->rparam('data') ) {
|
|
|
|
|
|
|
|
require Lemonldap::NG::Manager::Uploader; #inherits
|
|
|
|
$self->confUpload($rdata);
|
|
|
|
$self->quit();
|
|
|
|
}
|
|
|
|
require Lemonldap::NG::Manager::Downloader; #inherits
|
|
|
|
$self->{cfgNum} =
|
|
|
|
$self->param('cfgNum')
|
|
|
|
|| $self->confObj->lastCfg()
|
|
|
|
|| 'UNAVAILABLE';
|
|
|
|
if ( my $p = $self->param('node') ) {
|
|
|
|
print $self->header( -type => 'text/html; charset=utf8', );
|
|
|
|
print $self->node($p);
|
|
|
|
$self->quit();
|
|
|
|
}
|
|
|
|
return $self;
|
|
|
|
}
|
|
|
|
|
2009-12-17 20:20:17 +01:00
|
|
|
## @method string menu()
|
|
|
|
# Build the tree menu.
|
|
|
|
# @return HTML string
|
2009-12-11 19:17:00 +01:00
|
|
|
sub menu {
|
2006-12-18 12:32:33 +01:00
|
|
|
my $self = shift;
|
2009-12-17 20:20:17 +01:00
|
|
|
require Lemonldap::NG::Manager::Downloader;
|
2009-12-11 19:17:00 +01:00
|
|
|
return
|
|
|
|
'<ul class="simpleTree">'
|
|
|
|
. $self->li( 'root', 'root' )
|
|
|
|
. $self->span( 'root', "Configuration $self->{cfgNum}",
|
|
|
|
$self->{cfgNum}, 'none' )
|
|
|
|
. '<ul>'
|
|
|
|
. $self->node()
|
|
|
|
. '</ul></li></ul>';
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
2009-12-13 16:40:33 +01:00
|
|
|
__END__
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
|
|
|
Lemonldap::NG::Manager - Perl extension for managing Lemonldap::NG Web-SSO
|
|
|
|
system.
|
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
See example/Index.pl
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
|
Lemonldap::NG::Manager provides a web interface to manage Lemonldap::NG Web-SSO
|
|
|
|
system.
|
|
|
|
|
|
|
|
=head1 SEE ALSO
|
|
|
|
|
|
|
|
L<Lemonldap::NG::Handler>, L<Lemonldap::NG::Portal>, L<CGI>,
|
|
|
|
http://wiki.lemonldap.objectweb.org/xwiki/bin/view/NG/Presentation
|
|
|
|
|
|
|
|
=head1 AUTHOR
|
|
|
|
|
|
|
|
Xavier Guimard, E<lt>x.guimard@free.frE<gt>
|
|
|
|
|
|
|
|
=head1 BUG REPORT
|
|
|
|
|
|
|
|
Use OW2 system to report bug or ask for features:
|
|
|
|
L<http://forge.objectweb.org/tracker/?group_id=274>
|
|
|
|
|
|
|
|
=head1 DOWNLOAD
|
|
|
|
|
|
|
|
Lemonldap::NG is available at
|
|
|
|
L<http://forge.objectweb.org/project/showfiles.php?group_id=274>
|
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE
|
|
|
|
|
|
|
|
Copyright (C) 2006-2009 by Xavier Guimard
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify
|
|
|
|
it under the same terms as Perl itself, either Perl version 5.8.8 or,
|
|
|
|
at your option, any later version of Perl 5 you may have available.
|
|
|
|
|
|
|
|
=cut
|