Commit 2f31b05c authored by Xavier Guimard's avatar Xavier Guimard

Keep combination keys (#1151)

parent 46946794
......@@ -17,14 +17,12 @@ sub compactConf {
$mod = lc($mod);
$keep{$mod} = 1;
}
if ( $keep{multi} ) {
foreach my $prm (qw(multiAuthStack multiUserDBStack)) {
my @tmp = split /;\s*/, $conf->{$prm};
foreach (@tmp) {
s/^(\w+).*$/lc($1)/e;
s/OpenIDConnect/oidc/i;
$keep{$_} = 1;
}
if ( $keep{combination} ) {
foreach my $md (keys %{$conf->{combModules}}) {
$_ = $conf->{combModules}->{$md}->{type};
s/^(\w+).*$/lc($1)/e;
s/OpenIDConnect/oidc/i;
$keep{$_} = 1;
}
}
if ( $keep{choice} ) {
......
......@@ -27,7 +27,11 @@ ok( $resBody->{result} == 1, "JSON response contains \"result:1\"" )
ok( $res = &client->_get( '/confs/2/combModules', 'application/json' ), 'Get combModules');
ok( $resBody = from_json( $res->[2]->[0] ), "Result body contains JSON text" );
count(6);
ok( $res = &client->_get( '/confs/2/ldapServer', 'application/json' ), 'Get combModules');
ok( $resBody = from_json( $res->[2]->[0] ), "Result body contains JSON text" );
ok( $resBody->{value} eq 'ldap://192.168.1.1', 'Key ldapServer has been modified');
count(8);
done_testing( count() );
......
......@@ -828,10 +828,11 @@
"type": "keyTextContainer"
},
{
"_nodes": [{
"nodes": [{
"default": "ldap://localhost",
"id": "ldapServer",
"title": "ldapServer"
"title": "ldapServer",
"data": "ldap://192.168.1.1"
},
{
"default": 389,
......
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