diff --git a/build/lemonldap-ng/Doxyfile b/build/lemonldap-ng/Doxyfile index 6b8012ab1..59e7fb5dc 100644 --- a/build/lemonldap-ng/Doxyfile +++ b/build/lemonldap-ng/Doxyfile @@ -316,14 +316,14 @@ EXTRACT_ANON_NSPACES = NO # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. -HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. -HIDE_UNDOC_CLASSES = NO +HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. @@ -1322,7 +1322,7 @@ INCLUDED_BY_GRAPH = YES # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. -CALL_GRAPH = NO +CALL_GRAPH = YES # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function diff --git a/build/lemonldap-ng/Makefile b/build/lemonldap-ng/Makefile index 73351eced..5c616bdcf 100644 --- a/build/lemonldap-ng/Makefile +++ b/build/lemonldap-ng/Makefile @@ -448,7 +448,13 @@ documentation: @cd doc/ && ../scripts/doc.pl doxygen: clean - doxygen Doxyfile + COLLABORATIVE_GRAPH=1 doxygen Doxyfile + mkdir doc/devel/tmp + mv doc/devel/html/inherit* doc/devel/tmp/ + COLLABORATIVE_GRAPH=0 doxygen Doxyfile + mv -f doc/devel/tmp/* doc/devel/html/ + rm -rf doc/devel/tmp + perl -i -pe 's/Graphical Class Hierarchy/Class Collaboration Graph/' doc/devel/html/inherits.html doc/devel/html/tree.html distclean: clean diff --git a/build/lemonldap-ng/scripts/DoxyGen/PerlFilter.pm b/build/lemonldap-ng/scripts/DoxyGen/PerlFilter.pm index 9d7740f74..3ba423cb0 100644 --- a/build/lemonldap-ng/scripts/DoxyGen/PerlFilter.pm +++ b/build/lemonldap-ng/scripts/DoxyGen/PerlFilter.pm @@ -188,7 +188,7 @@ sub filter { redo if defined $_; } elsif (/^use\s+([\w:]+)/) { my $inc = $1; - $inc =~ s/::/\//g; + #$inc =~ s/::/\//g; $self->print("#include \"$inc.pm\"\n"); } elsif (/^package\s+([\w:]+)/) { if ($current_class) { @@ -299,20 +299,27 @@ sub analyze_sub { sub emit_class { my( $self, $class, $line, $doc ) = @_; - my(@current_isa, @current_include, @links); + my(@current_isa, @current_priv_isa, @current_include, %links); my $file = $self->file_contents(); while ($_ = $file->[$line++] ) { if (/^\s*(?:use base|\@ISA\s*=|\@${class}::ISA\s*=)\s+(.+);/) { push @current_isa, eval $1; $file->[$line-1] = "\n"; - } elsif (/^use\s+([\w:]+)/) { + } elsif (/^\s*(?:use|require)\s+([\w:]+)/) { my $inc = $1; + $links{$1||'public'}{$inc} = $2 . ($3 ? "\n* $3" : '') if (/#\s*link\s+(?:(private|protected|public)\s+)?(\S+)(?:\s+(.*))?\s*$/); + push @current_priv_isa, $inc if (/#\s*inherits/); $inc =~ s/::/\//g; + $inc =~ s#Lemonldap/NG/(\w+)#"lemonldap-ng-".lc($1)."/lib/Lemonldap/NG/$1"#e; + print STDERR $inc; push @current_include, $inc; - push @links, $inc if (/#link$/); $file->[$line-1] = "\n"; } elsif (/^package/) { last; + } elsif (/#\s*inherits\s+([\w:]+)/) { + push @current_priv_isa, $1; + } elsif (/#\s*link\s+([\w:]+)\s+(?:(private|protected|public)\s+)?(\S+)(?:\s+(.*))?\s*$/) { + $links{$2||'public'}{$1} = $3 . ($4 ? "\n* $4" : ''); } } @@ -326,16 +333,29 @@ sub emit_class { } $self->print("class $class"); - if (@current_isa) { - $self->print(":", - join(", ", map {"public $_"} @current_isa) ); + if (@current_isa or @current_priv_isa) { + my @tmp; + @tmp = map {"public $_"} @current_isa; + if($ENV{COLLABORATIVE_GRAPH}) { + foreach my $type(qw(public protected private)) { + push @tmp, map {"$type $_"} keys %{$links{$type}}; + } + } + push @tmp, map {"private $_"} @current_priv_isa; + $self->print(":", join(", ", @tmp)); } $self->print(" {\n"); - if (@links) { - $self->print("public:\n"); - $self->print("$_ depends;\n") foreach(@links); + foreach my $target(qw(private protected public)) { + if($links{$target}) { + $self->print("$target:\n"); + foreach(keys %{$links{$target}}) { + $self->print("/** \@var $_ $links{$target}{$_}\n"); + $links{$target}{$_} =~ s/\n.*$//s; + $self->print("*/\n$_ $links{$target}{$_};\n"); + } } - $self->print("public:\n"); + } + $self->print("public:\n") unless($links{public}); } diff --git a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/CGI.pm b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/CGI.pm index f36ee0775..4c26c1bf7 100644 --- a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/CGI.pm +++ b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/CGI.pm @@ -10,6 +10,7 @@ use strict; use MIME::Base64; use Time::Local; use CGI; +#inherits Lemonldap::NG::Common::CGI::SOAPServer our $VERSION = '0.31'; diff --git a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm index cdfad5b91..a7ccb9d56 100644 --- a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm +++ b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf.pm @@ -10,10 +10,14 @@ package Lemonldap::NG::Common::Conf; use strict; no strict 'refs'; use Data::Dumper; -use Lemonldap::NG::Common::Conf::Constants; -use Lemonldap::NG::Common::Crypto; +use Lemonldap::NG::Common::Conf::Constants; #inherits +use Lemonldap::NG::Common::Crypto; #link protected cipher Object "cypher" in configuration hash use Regexp::Assemble; +#inherits Lemonldap::NG::Common::Conf::File +#inherits Lemonldap::NG::Common::Conf::DBI +#inherits Lemonldap::NG::Common::Conf::SOAP + use constant DEFAULTCONFFILE => "/etc/lemonldap-ng/storage.conf"; our $VERSION = 0.51; diff --git a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/File.pm b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/File.pm index 73ea4984e..2475b50ad 100644 --- a/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/File.pm +++ b/modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/File.pm @@ -1,7 +1,7 @@ package Lemonldap::NG::Common::Conf::File; use strict; -use Lemonldap::NG::Common::Conf::Constants; +use Lemonldap::NG::Common::Conf::Constants; #inherits our $VERSION = 0.22; diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm index 46d896ff5..394ae4b29 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/AuthBasic.pm @@ -8,7 +8,7 @@ package Lemonldap::NG::Handler::AuthBasic; use strict; use Lemonldap::NG::Handler::SharedConf qw(:all); -use Lemonldap::NG::Portal::SharedConf; +use Lemonldap::NG::Portal::SharedConf; #inherits use Digest::MD5 qw(md5_base64); use MIME::Base64; diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm index d03b17f0b..9302697eb 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/CGI.pm @@ -14,6 +14,7 @@ use MIME::Base64; use base qw(Lemonldap::NG::Common::CGI); use Lemonldap::NG::Handler::SharedConf qw(:all); +#inherits Lemonldap::NG::Handler::_CGI our $VERSION = '0.2'; diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm index aac759e6e..b6bb99df7 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/SharedConf.pm @@ -19,7 +19,7 @@ use strict; use Lemonldap::NG::Handler::Simple qw(:all); use Lemonldap::NG::Handler::Vhost; -use Lemonldap::NG::Common::Conf; +use Lemonldap::NG::Common::Conf; #link protected lmConf use Cache::Cache qw($EXPIRES_NEVER); use base qw(Lemonldap::NG::Handler::Vhost Lemonldap::NG::Handler::Simple); diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm index 396a1f7a2..88d9b734c 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm @@ -20,6 +20,9 @@ use Exporter 'import'; use Safe; require Data::Dumper; require POSIX; +#inherits Cache::Cache +#inherits Apache::Session +#inherits Lemonldap::NG::Common::Apache::Session::SOAP our $VERSION = '0.9'; diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm index d7cec2050..40de79a26 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Status.pm @@ -6,6 +6,7 @@ package Lemonldap::NG::Handler::Status; use strict; use POSIX; use Data::Dumper; +#inherits Cache::Cache our $VERSION = "0.2"; diff --git a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Vhost.pm b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Vhost.pm index 67c706954..6e384017d 100644 --- a/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Vhost.pm +++ b/modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Vhost.pm @@ -5,7 +5,7 @@ # This class adds virtual host support for Lemonldap::NG handlers. package Lemonldap::NG::Handler::Vhost; -use Lemonldap::NG::Handler::Simple qw(:locationRules :headers); +use Lemonldap::NG::Handler::Simple qw(:locationRules :headers); #inherits use strict; use MIME::Base64; diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm index ca69bfc4f..5d490b4a1 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm @@ -10,15 +10,16 @@ use strict; use XML::Simple; use Lemonldap::NG::Common::CGI; -use Lemonldap::NG::Common::Conf; -use Lemonldap::NG::Manager::_HTML; -require Lemonldap::NG::Manager::_Response; -require Lemonldap::NG::Manager::_i18n; -require Lemonldap::NG::Manager::Help; -use Lemonldap::NG::Common::Conf::Constants; +use Lemonldap::NG::Common::Conf; #link protected conf Configuration +use Lemonldap::NG::Manager::_HTML; #inherits +require Lemonldap::NG::Manager::_Response; #inherits +require Lemonldap::NG::Manager::_i18n; #inherits +require Lemonldap::NG::Manager::Help; #inherits +use Lemonldap::NG::Common::Conf::Constants; #inherits use LWP::UserAgent; use Safe; use MIME::Base64; +#inherits Lemonldap::NG::Handler::CGI use base qw(Lemonldap::NG::Common::CGI); our @ISA; @@ -54,6 +55,7 @@ sub new { my ( $class, $args ) = @_; my $self; if ( $args->{protection} ) { + require Lemonldap::NG::Handler::CGI; unshift @ISA, "Lemonldap::NG::Handler::CGI"; $self = $class->SUPER::new($args); } diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Restricted.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Restricted.pm index 434bc47f5..14fad3a65 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Restricted.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Restricted.pm @@ -8,7 +8,7 @@ package Lemonldap::NG::Manager::Restricted; use strict; use Lemonldap::NG::Manager; -use Lemonldap::NG::Common::Conf::Constants; +use Lemonldap::NG::Common::Conf::Constants; #inherits use base qw(Lemonldap::NG::Manager); our $VERSION = "0.1"; diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/SOAPServer.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/SOAPServer.pm index 4795244b2..5fa65247b 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/SOAPServer.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/SOAPServer.pm @@ -2,7 +2,7 @@ package Lemonldap::NG::Manager::SOAPServer; use strict; use SOAP::Transport::HTTP; -use Lemonldap::NG::Common::Conf; +use Lemonldap::NG::Common::Conf; #link protected config Configuration hash reference use UNIVERSAL qw(isa); our $VERSION = "0.3"; diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm index 8d518ed63..3235e4d09 100755 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm @@ -7,7 +7,8 @@ package Lemonldap::NG::Manager::Sessions; use strict; use Lemonldap::NG::Handler::CGI qw(:globalStorage :locationRules); -use Lemonldap::NG::Common::Apache::Session; +use Lemonldap::NG::Common::Apache::Session; #inherits +#inherits Apache::Session our $VERSION = '0.1'; diff --git a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_HTML.pm b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_HTML.pm index e9d770c9f..3a50b393b 100644 --- a/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_HTML.pm +++ b/modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_HTML.pm @@ -10,8 +10,8 @@ package Lemonldap::NG::Manager::_HTML; # comes for the first time. use AutoLoader qw(AUTOLOAD); -require Lemonldap::NG::Manager::_i18n; -use Lemonldap::NG::Common::Conf::Constants; +require Lemonldap::NG::Manager::_i18n; #inherits +use Lemonldap::NG::Common::Conf::Constants; #inherits our $VERSION = '0.31'; diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthLDAP.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthLDAP.pm index e613e5f17..3bc309420 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthLDAP.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/AuthLDAP.pm @@ -6,9 +6,9 @@ package Lemonldap::NG::Portal::AuthLDAP; use Lemonldap::NG::Portal::Simple; -use Lemonldap::NG::Portal::_LDAP; +use Lemonldap::NG::Portal::_LDAP; #link protected ldap use Lemonldap::NG::Portal::_WebForm; -use Lemonldap::NG::Portal::UserDBLDAP; +use Lemonldap::NG::Portal::UserDBLDAP; #inherits our $VERSION = '0.2'; use base qw(Lemonldap::NG::Portal::_WebForm); diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Menu.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Menu.pm index b7b91bf2f..8c7e671b4 100755 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Menu.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Menu.pm @@ -9,9 +9,10 @@ use strict; use warnings; require Lemonldap::NG::Common::CGI; use Lemonldap::NG::Portal::SharedConf; -use Lemonldap::NG::Portal::_LDAP; +use Lemonldap::NG::Portal::_LDAP; #link protected ldap Object used to change passwords only use XML::LibXML; use Safe; +#inherits Net::LDAP::Control::PasswordPolicy our $VERSION = '0.01'; diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification.pm index 0975de1c6..6bb93e6f0 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Notification.pm @@ -14,10 +14,10 @@ use CGI::Cookie; use MIME::Base64; our $VERSION = '0.01'; -our ( $msg, $stylesheet, $parser ); +our ( $msg, $stylesheet, $parser, $self ); BEGIN { - my $xslt = XML::LibXSLT->new(); + my $xslt = XML::LibXSLT->new(); $parser = XML::LibXML->new(); my $style_doc = $parser->parse_string( q# @@ -60,7 +60,7 @@ BEGIN { # @return Lemonldap::NG::Portal::Notification object sub new { my ( $class, $storage ) = @_; - my $self = bless {}, $class; + $self = bless {}, $class; (%$self) = (%$storage); $self->{type} = "Lemonldap::NG::Common::Conf::$self->{type}" unless $self->{type} =~ /^Lemonldap::/; @@ -110,16 +110,16 @@ sub getNotification { foreach my $notif (@notifs) { $i++; - eval { + eval { my $xml = $parser->parse_string($notif); my $results = $stylesheet->transform( $xml, start => $i ); - $form .= $stylesheet->output_string($results); - }; - if ($@) { + $form .= $stylesheet->output_string($results); + }; + if ($@) { print STDERR "Bad XML file: a notification for $uid was not done ($@)\n"; - return 0; - } + return 0; + } } # Now a notification has to be done. Replace cookies by hidden fields @@ -184,7 +184,9 @@ sub checkNotification { push @{ $checks->{$1} }, $2; } } + $portal->controlExistingSession() unless ( $portal->{sessionInfo} ); unless ( $portal->{sessionInfo} ) { + print STDERR "Invalid session\n"; return 0; } my $result = 1; @@ -243,6 +245,55 @@ sub checkNotification { return $result; } +## @method int newNotification(string xml) +# Check XML datas and insert new notifications. +# @param $xml XML string containing notification +# @return number of notifications done +sub newNotification { + my ( $class, $xml ) = @_; + eval { $xml = $parser->parse_string($xml); }; + if ($@) { + print STDERR "Unable to read XML file : $@\n"; + return 0; + } + my @notifs; + my ( $version, $encoding ) = ( $xml->version(), $xml->encoding() ); + foreach + my $notif ( $xml->documentElement->getElementsByTagName('notification') ) + { + my @datas = (); + foreach (qw(date uid reference)) { + my $tmp; + unless ( $tmp = $notif->getAttribute($_) ) { + print STDERR "Attribute $_ is missing\n"; + return 0; + } + push @datas, $tmp; + } + my $result = XML::LibXML::Document->new( $version, $encoding ); + my $root = XML::LibXML::Element->new('root'); + $root->appendChild($notif); + $result->setDocumentElement($root); + push @notifs, [ @datas, $result->serialize ]; + } + my $tmp = $self->{type}; + $tmp =~ s/.*:://; + $tmp = "newNotif" . $tmp; + my $count; + foreach (@notifs) { + $count++; + my ( $r, $err ) = $self->$tmp(@$_); + die "$err" unless ($r); + } + return $count; +} + +## @method protected array getFile(string uid,string ref) +# In file context, returns notifications corresponding to the user $uid. +# If $ref is set, returns only notification corresponding to this reference. +# @param $uid UID +# @param $ref Notification reference +# @return Array of XML strings sub getFile { my ( $self, $uid, $ref ) = @_; return () unless ($uid); @@ -270,7 +321,21 @@ sub getFile { sub deleteFile { my ( $self, $file ) = @_; - return unlink( $self->{dirName} . "/$file" ); + my $new = ($file =~ /(.*?)(?:\.xml)$/)[0] . '.done'; + return rename( $self->{dirName} . "/$file", $self->{dirName} . "/$new" ); +} + +sub newNotifFile { + my ( $class, $date, $uid, $ref, $xml ) = @_; + $date =~ s/-//g; + return ( 0, "Bad date" ) unless ( $date =~ /^\d{8}/ ); + my $filename = + $self->{dirName} + . "/${date}_${uid}_" + . encode_base64( $ref, '' ) . ".xml"; + open F, ">$filename" or return ( 0, "Unable to create $filename ($!)" ); + print F $xml; + return close F; } sub prereq { diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/SharedConf.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/SharedConf.pm index 6bb5b60e8..c1e958ddd 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/SharedConf.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/SharedConf.pm @@ -7,7 +7,7 @@ package Lemonldap::NG::Portal::SharedConf; use strict; use Lemonldap::NG::Portal::Simple qw(:all); -use Lemonldap::NG::Common::Conf; +use Lemonldap::NG::Common::Conf; #link protected lmConf Configuration *EXPORT_OK = *Lemonldap::NG::Portal::Simple::EXPORT_OK; *EXPORT_TAGS = *Lemonldap::NG::Portal::Simple::EXPORT_TAGS; diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm index 1b59062dc..653027d75 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Simple.pm @@ -15,9 +15,20 @@ use MIME::Base64; use Lemonldap::NG::Common::CGI; use CGI::Cookie; require POSIX; -use Lemonldap::NG::Portal::_i18n; +use Lemonldap::NG::Portal::_i18n; #inherits use Safe; +# Special comments for doxygen +#inherits Lemonldap::NG::Portal::AuthApache +#inherits Lemonldap::NG::Portal::AuthCAS +#inherits Lemonldap::NG::Portal::AuthLDAP +#inherits Lemonldap::NG::Portal::AuthSSL +#inherits Lemonldap::NG::Portal::Menu +#inherits Lemonldap::NG::Portal::Notification +#inherits Lemonldap::NG::Portal::UserDBLDAP +#inherits Apache::Session +#inherits Lemonldap::NG::Common::Apache::Session::SOAP + our $VERSION = '0.86'; use base qw(Lemonldap::NG::Common::CGI Exporter); @@ -144,6 +155,12 @@ sub new { $self->abort($Lemonldap::NG::Portal::Notification::msg) unless ( $self->{notifObject} ); } + if ( $self->{notification} and $ENV{PATH_INFO} and $ENV{PATH_INFO} =~ "/notification" ) { + require SOAP::Lite; + $Lemonldap::NG::Portal::Notification::self = $self->{notifObject}; + $self->soapTest('Lemonldap::NG::Portal::Notification::newNotification'); + $self->abort('Bad request', 'Only SOAP requests are accepted with "/notification"'); + } if ( $self->{Soap} ) { require SOAP::Lite; $self->soapTest("${class}::getCookies ${class}::error"); diff --git a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBLDAP.pm b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBLDAP.pm index c438530b7..98262edb8 100644 --- a/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBLDAP.pm +++ b/modules/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/UserDBLDAP.pm @@ -6,7 +6,7 @@ package Lemonldap::NG::Portal::UserDBLDAP; use Lemonldap::NG::Portal::Simple; -use Lemonldap::NG::Portal::_LDAP; +use Lemonldap::NG::Portal::_LDAP; #link protected ldap our $VERSION = '0.1';