Types wre not well copied (#820)

This commit is contained in:
Xavier Guimard 2016-02-03 21:30:30 +00:00
parent a704133330
commit 7fc0e05371
2 changed files with 36 additions and 33 deletions

View File

@ -186,7 +186,7 @@ qr/^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9\/\+\
'test' => sub { 'test' => sub {
my $test = my $test =
grep( { $_ eq $_[0]; } grep( { $_ eq $_[0]; }
map( { $$_{'k'}; } @{ $_[2]{'select'}; } ) ); map( { $_->{'k'}; } @{ $_[2]{'select'}; } ) );
return $test return $test
? 1 ? 1
: ( 0, "Invalid value '$_[0]' for this select" ); : ( 0, "Invalid value '$_[0]' for this select" );
@ -559,7 +559,7 @@ sub attributes {
}, },
'captchaStorage' => { 'captchaStorage' => {
'default' => 'Apache::Session::File', 'default' => 'Apache::Session::File',
'type' => 'text' 'type' => 'PerlModule'
}, },
'captchaStorageOptions' => { 'captchaStorageOptions' => {
'default' => { 'default' => {
@ -619,7 +619,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
'type' => 'keyTextContainer' 'type' => 'keyTextContainer'
}, },
'casStorage' => { 'casStorage' => {
'type' => 'text' 'type' => 'PerlModule'
}, },
'casStorageOptions' => { 'casStorageOptions' => {
'type' => 'keyTextContainer' 'type' => 'keyTextContainer'
@ -779,7 +779,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'globalStorage' => { 'globalStorage' => {
'default' => 'Apache::Session::File', 'default' => 'Apache::Session::File',
'type' => 'text' 'type' => 'PerlModule'
}, },
'globalStorageOptions' => { 'globalStorageOptions' => {
'default' => { 'default' => {
@ -856,7 +856,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'issuerDBCASPath' => { 'issuerDBCASPath' => {
'default' => '^/cas/', 'default' => '^/cas/',
'type' => 'text' 'type' => 'pcre'
}, },
'issuerDBCASRule' => { 'issuerDBCASRule' => {
'default' => 1, 'default' => 1,
@ -880,7 +880,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'issuerDBOpenIDPath' => { 'issuerDBOpenIDPath' => {
'default' => '^/openidserver/', 'default' => '^/openidserver/',
'type' => 'text' 'type' => 'pcre'
}, },
'issuerDBOpenIDRule' => { 'issuerDBOpenIDRule' => {
'default' => 1, 'default' => 1,
@ -892,7 +892,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'issuerDBSAMLPath' => { 'issuerDBSAMLPath' => {
'default' => '^/saml/', 'default' => '^/saml/',
'type' => 'text' 'type' => 'pcre'
}, },
'issuerDBSAMLRule' => { 'issuerDBSAMLRule' => {
'default' => 1, 'default' => 1,
@ -1011,7 +1011,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'default' => 'ldap://localhost', 'default' => 'ldap://localhost',
'test' => sub { 'test' => sub {
my $l = shift(); my $l = shift();
my (@s) = split( /[\s,]+/, $l, 0 ); my @s = split( /[\s,]+/, $l, 0 );
foreach my $s (@s) { foreach my $s (@s) {
return 0, qq[Bad ldap uri "$s"] return 0, qq[Bad ldap uri "$s"]
unless $s =~ unless $s =~
@ -1039,7 +1039,7 @@ m[^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
}, },
'localSessionStorage' => { 'localSessionStorage' => {
'default' => 'Cache::FileCache', 'default' => 'Cache::FileCache',
'type' => 'text' 'type' => 'PerlModule'
}, },
'localSessionStorageOptions' => { 'localSessionStorageOptions' => {
'default' => { 'default' => {
@ -1118,7 +1118,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'mailUrl' => { 'mailUrl' => {
'default' => 'http://auth.example.com/mail.pl', 'default' => 'http://auth.example.com/mail.pl',
'type' => 'text' 'type' => 'url'
}, },
'maintenance' => { 'maintenance' => {
'default' => 0, 'default' => 0,
@ -1156,7 +1156,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'notificationStorage' => { 'notificationStorage' => {
'default' => 'File', 'default' => 'File',
'type' => 'text' 'type' => 'PerlModule'
}, },
'notificationStorageOptions' => { 'notificationStorageOptions' => {
'default' => { 'default' => {
@ -1222,7 +1222,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'password' 'type' => 'password'
}, },
'oidcOPMetaDataOptionsConfigurationURI' => { 'oidcOPMetaDataOptionsConfigurationURI' => {
'type' => 'text' 'type' => 'url'
}, },
'oidcOPMetaDataOptionsDisplay' => { 'oidcOPMetaDataOptionsDisplay' => {
'default' => '', 'default' => '',
@ -1449,7 +1449,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'RSAPublicKey' 'type' => 'RSAPublicKey'
}, },
'oidcStorage' => { 'oidcStorage' => {
'type' => 'text' 'type' => 'PerlModule'
}, },
'oidcStorageOptions' => { 'oidcStorageOptions' => {
'type' => 'keyTextContainer' 'type' => 'keyTextContainer'
@ -1483,35 +1483,35 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'blackWhiteList' 'type' => 'blackWhiteList'
}, },
'openIdSreg_country' => { 'openIdSreg_country' => {
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_dob' => { 'openIdSreg_dob' => {
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_email' => { 'openIdSreg_email' => {
'default' => 'mail', 'default' => 'mail',
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_fullname' => { 'openIdSreg_fullname' => {
'default' => 'cn', 'default' => 'cn',
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_gender' => { 'openIdSreg_gender' => {
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_language' => { 'openIdSreg_language' => {
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_nickname' => { 'openIdSreg_nickname' => {
'default' => 'uid', 'default' => 'uid',
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_postcode' => { 'openIdSreg_postcode' => {
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'openIdSreg_timezone' => { 'openIdSreg_timezone' => {
'default' => '_timezone', 'default' => '_timezone',
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'passwordDB' => { 'passwordDB' => {
'default' => 'Demo', 'default' => 'Demo',
@ -1544,7 +1544,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
'type' => 'select' 'type' => 'select'
}, },
'persistentStorage' => { 'persistentStorage' => {
'type' => 'text' 'type' => 'PerlModule'
}, },
'persistentStorageOptions' => { 'persistentStorageOptions' => {
'type' => 'keyTextContainer' 'type' => 'keyTextContainer'
@ -1554,7 +1554,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'portal' => { 'portal' => {
'default' => 'http://auth.example.com/', 'default' => 'http://auth.example.com/',
'type' => 'text' 'type' => 'url'
}, },
'portalAntiFrame' => { 'portalAntiFrame' => {
'default' => 1, 'default' => 1,
@ -1701,7 +1701,7 @@ qr/^(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.])*(?:[a-zA-Z][-a-zA-Z0-
}, },
'randomPasswordRegexp' => { 'randomPasswordRegexp' => {
'default' => '[A-Z]{3}[a-z]{5}.\\d{2}', 'default' => '[A-Z]{3}[a-z]{5}.\\d{2}',
'type' => 'text' 'type' => 'pcre'
}, },
'redirectFormMethod' => { 'redirectFormMethod' => {
'default' => 'get', 'default' => 'get',
@ -1768,7 +1768,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
}, },
'remoteGlobalStorage' => { 'remoteGlobalStorage' => {
'default' => 'Lemonldap::NG::Common::Apache::Session::SOAP', 'default' => 'Lemonldap::NG::Common::Apache::Session::SOAP',
'type' => 'text' 'type' => 'PerlModule'
}, },
'remoteGlobalStorageOptions' => { 'remoteGlobalStorageOptions' => {
'default' => { 'default' => {
@ -2278,7 +2278,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
'type' => 'bool' 'type' => 'bool'
}, },
'samlStorage' => { 'samlStorage' => {
'type' => 'text' 'type' => 'PerlModule'
}, },
'samlStorageOptions' => { 'samlStorageOptions' => {
'type' => 'keyTextContainer' 'type' => 'keyTextContainer'
@ -2331,7 +2331,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
}, },
'secureTokenUrls' => { 'secureTokenUrls' => {
'default' => '.*', 'default' => '.*',
'type' => 'text' 'type' => 'pcre'
}, },
'sessionDataToRemember' => { 'sessionDataToRemember' => {
'keyTest' => qr/^[_a-zA-Z][a-zA-Z0-9_]*$/, 'keyTest' => qr/^[_a-zA-Z][a-zA-Z0-9_]*$/,
@ -2386,7 +2386,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
}, },
'SMTPServer' => { 'SMTPServer' => {
'default' => '', 'default' => '',
'type' => 'text' 'type' => 'hostname'
}, },
'Soap' => { 'Soap' => {
'default' => 0, 'default' => 0,
@ -2459,7 +2459,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
}, },
'userControl' => { 'userControl' => {
'default' => '^[\\w\\.\\-@]+$', 'default' => '^[\\w\\.\\-@]+$',
'type' => 'text' 'type' => 'pcre'
}, },
'userDB' => { 'userDB' => {
'default' => 'Demo', 'default' => 'Demo',
@ -2583,7 +2583,7 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
}, },
'whatToTrace' => { 'whatToTrace' => {
'default' => 'uid', 'default' => 'uid',
'type' => 'text' 'type' => 'lmAttrOrMacro'
}, },
'yubikeyAuthnLevel' => { 'yubikeyAuthnLevel' => {
'default' => 3, 'default' => 3,
@ -2628,10 +2628,10 @@ qr/^(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.
'type' => 'text' 'type' => 'text'
}, },
'zimbraSsoUrl' => { 'zimbraSsoUrl' => {
'type' => 'text' 'type' => 'url'
}, },
'zimbraUrl' => { 'zimbraUrl' => {
'type' => 'text' 'type' => 'url'
} }
}; };
} }

View File

@ -175,6 +175,9 @@ our \@sessionTypes = ( '$sessionTypes' );
EOF EOF
# Reinitialize $attributes
$attributes = Lemonldap::NG::Manager::Build::Attributes::attributes();
$ra = Regexp::Assemble->new; $ra = Regexp::Assemble->new;
foreach (@simpleHashKeys) { foreach (@simpleHashKeys) {
$ra->add($_); $ra->add($_);