Create fake type "subContainer"
This commit is contained in:
parent
9cfb59ad81
commit
baa2be3d78
|
@ -835,6 +835,9 @@ sub attributes {
|
||||||
documentation => 'Virtualhost urls/Datas to post',
|
documentation => 'Virtualhost urls/Datas to post',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
vhostOptions => {
|
||||||
|
type => 'subContainer',
|
||||||
|
},
|
||||||
vhostPort => {
|
vhostPort => {
|
||||||
type => 'int',
|
type => 'int',
|
||||||
default => -1,
|
default => -1,
|
||||||
|
@ -2003,6 +2006,8 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
|
||||||
{ type => 'oidcOPMetaDataNodeContainer', help => 'oidcop.html', },
|
{ type => 'oidcOPMetaDataNodeContainer', help => 'oidcop.html', },
|
||||||
oidcRPMetaDataNodes =>
|
oidcRPMetaDataNodes =>
|
||||||
{ type => 'oidcRPMetaDataNodeContainer', help => 'oidcrp.html', },
|
{ type => 'oidcRPMetaDataNodeContainer', help => 'oidcrp.html', },
|
||||||
|
oidcOPMetaDataOptions => { type => 'subContainer', },
|
||||||
|
oidcRPMetaDataOptions => { type => 'subContainer', },
|
||||||
|
|
||||||
# OpenID Connect providers
|
# OpenID Connect providers
|
||||||
oidcOPMetaDataJSON => { type => 'oidcmetadatajson', },
|
oidcOPMetaDataJSON => { type => 'oidcmetadatajson', },
|
||||||
|
|
|
@ -474,6 +474,12 @@ sub _unitTest {
|
||||||
foreach my $key ( keys %$conf ) {
|
foreach my $key ( keys %$conf ) {
|
||||||
my ( $attr, $type );
|
my ( $attr, $type );
|
||||||
|
|
||||||
|
if ( $attr->{type} and $attr->{type} eq 'subContainer' ) {
|
||||||
|
|
||||||
|
# TODO Recursive
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
# Check if key exists
|
# Check if key exists
|
||||||
unless ( $attr = $attrs->{$key} ) {
|
unless ( $attr = $attrs->{$key} ) {
|
||||||
push @{ $self->errors }, { message => "__unknownKey__: $key" };
|
push @{ $self->errors }, { message => "__unknownKey__: $key" };
|
||||||
|
@ -487,6 +493,10 @@ sub _unitTest {
|
||||||
|
|
||||||
#TODO
|
#TODO
|
||||||
}
|
}
|
||||||
|
elsif ( $attr->{type} =~ /Container$/ ) {
|
||||||
|
|
||||||
|
#TODO
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
die "Unkown type $attr->{type}"
|
die "Unkown type $attr->{type}"
|
||||||
unless ( $type = $types->{ $attr->{type} } );
|
unless ( $type = $types->{ $attr->{type} } );
|
||||||
|
@ -501,7 +511,8 @@ sub _unitTest {
|
||||||
$res = 0;
|
$res = 0;
|
||||||
}
|
}
|
||||||
elsif ($w) {
|
elsif ($w) {
|
||||||
push @{ $self->warnings }, { message => "$key: $w" };
|
push @{ $self->warnings },
|
||||||
|
{ message => "$key: $w" };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elsif ( $ref eq 'Regexp' ) {
|
elsif ( $ref eq 'Regexp' ) {
|
||||||
|
@ -523,6 +534,7 @@ sub _unitTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ $count += 3;
|
||||||
ok( opendir( D, $formDir ), 'Found forms dir' );
|
ok( opendir( D, $formDir ), 'Found forms dir' );
|
||||||
my %forms = map { s/\.html$// ? ( $_ => 1 ) : () } readdir D;
|
my %forms = map { s/\.html$// ? ( $_ => 1 ) : () } readdir D;
|
||||||
close D;
|
close D;
|
||||||
|
|
||||||
delete $forms{white};
|
delete $forms{white};
|
||||||
delete $forms{restore};
|
delete $forms{restore};
|
||||||
|
|
||||||
|
@ -35,7 +36,10 @@ foreach(qw(home menuCat menuApp)){
|
||||||
|
|
||||||
foreach my $type ( keys %types ) {
|
foreach my $type ( keys %types ) {
|
||||||
delete $types{$type};
|
delete $types{$type};
|
||||||
next if($type =~ /^(?:url|PerlModule|hostname|pcre|lmAttrOrMacro|RSAP(?:ublic|rivate)Key)$/);
|
next
|
||||||
|
if ( $type =~
|
||||||
|
/^(?:url|PerlModule|hostname|pcre|lmAttrOrMacro|subContainer|RSAP(?:ublic|rivate)Key)$/
|
||||||
|
);
|
||||||
ok( $forms{$type}, "Found $type" );
|
ok( $forms{$type}, "Found $type" );
|
||||||
delete $forms{$type};
|
delete $forms{$type};
|
||||||
$count++;
|
$count++;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user