Commit e7acc7dc authored by Xavier Guimard's avatar Xavier Guimard

Merge branch 'master' of gitlab.ow2.org:lemonldap-ng/lemonldap-ng

parents 27bc5151 e6259754
......@@ -3211,7 +3211,8 @@ qr/^(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-
'type' => 'int'
},
'sslByAjax' => {
'type' => 'bool'
'default' => 0,
'type' => 'bool'
},
'sslHost' => {
'type' => 'url'
......
......@@ -2569,6 +2569,7 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
},
sslByAjax => {
type => 'bool',
default => 0,
documentation => 'Use Ajax request for SSL',
},
sslHost => {
......
......@@ -379,7 +379,6 @@ sub tree {
{
title => 'sslParams',
help => 'authssl.html',
form => 'simpleInputContainer',
nodes => [
'SSLAuthnLevel', 'SSLVar',
'SSLVarIf', 'sslByAjax',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -10,8 +10,16 @@ sub new {
eval $self->{p}->loadModule( $self->{conf}->{customAuth} );
($@)
? return $self->{p}->loadModule( $self->{conf}->{customAuth} )
: die 'Unable to load Auth module ' . $self->{conf}->{customAuth};
? return $self->{p}->loadModule( $self->{conf}->{customAuth} )
: die 'Unable to load Auth module ' . $self->{conf}->{customAuth};
}
sub getDisplayType {
my ( $class, $self ) = @_;
( -e $self->{conf}->{templateDir}
. "/../htdocs/static/common/modules/"
. $self->{conf}->{customAuth}
. ".png" ) ? return "logo" : return "standardform";
}
1;
......@@ -63,7 +63,8 @@ sub setAuthSessionInfo {
}
sub getDisplayType {
return ( $_[0]->conf->{sslByAjax} ? "sslform" : "logo" );
my ( $self ) = @_;
$self->{conf}->{sslByAjax} ? return "sslform" : return "logo";
}
1;
......@@ -5,7 +5,7 @@ use IO::String;
require 't/test-lib.pm';
my $res;
my $maintests = 8;
my $maintests = 9;
eval { unlink 't/userdb.db' };
......@@ -35,6 +35,7 @@ SKIP: {
'Demo;Demo;Null;https://test.example.com;$env->{ipAddr} =~ /127.0.0.1/',
'4_demo' =>
'Demo;Demo;Null;https://test.example.com;$env->{ipAddr} =~ /1.2.3.4/',
'5_ssl' => 'SSL;LDAP;LDAP',
},
dbiAuthChain => 'dbi:SQLite:dbname=t/userdb.db',
......@@ -49,8 +50,9 @@ SKIP: {
);
ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get Menu' );
ok( $res->[2]->[0] !~ /1_demo/, '1_Demo not displayed' );
ok( $res->[2]->[0] =~ /3_demo/, '3_Demo displayed' );
ok( $res->[2]->[0] !~ /1_demo/, '1_demo not displayed' );
ok( $res->[2]->[0] =~ /3_demo/, '3_demo displayed' );
ok( $res->[2]->[0] =~ /5_ssl/, '5_ssl displayed' );
ok( $res->[2]->[0] =~ m%<form action="https://test.example.com"%,
' Redirect URL found' )
or print STDERR Dumper( $res->[2]->[0] );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment