Register parameters in Manager (#26)

This commit is contained in:
Clément Oudot 2014-06-02 16:07:35 +00:00
parent 066f52caba
commit 1dd340faea
3 changed files with 88 additions and 26 deletions

View File

@ -56,6 +56,7 @@ var helpCh = {
'portalRedirections': '/pages/documentation/current/redirections.html#portal_redirections', 'portalRedirections': '/pages/documentation/current/redirections.html#portal_redirections',
'post': '/pages/documentation/current/formreplay.html', 'post': '/pages/documentation/current/formreplay.html',
'redirections': '/pages/documentation/current/redirections.html', 'redirections': '/pages/documentation/current/redirections.html',
'register': '/pages/documentation/current/register.html',
'reloadUrls': '/pages/documentation/current/configlocation.html#configuration_reload', 'reloadUrls': '/pages/documentation/current/configlocation.html#configuration_reload',
'rules': '/pages/documentation/current/writingrulesand_headers.html#rules', 'rules': '/pages/documentation/current/writingrulesand_headers.html#rules',
'samlIDP': '/pages/documentation/current/authsaml.html#register_partner_identity_provider_on_lemonldapng', 'samlIDP': '/pages/documentation/current/authsaml.html#register_partner_identity_provider_on_lemonldapng',
@ -735,6 +736,15 @@ function formateSelectPassword(id, value) {
} }
formateSelect(id, ['AD=Active Directory', 'DBI=Database (DBI)', 'Demo=Demonstration', 'LDAP=LDAP', 'Null=None'], value); formateSelect(id, ['AD=Active Directory', 'DBI=Database (DBI)', 'Demo=Demonstration', 'LDAP=LDAP', 'Null=None'], value);
} }
function registerdbParams(id) {
currentId = id;
$('#authOptions').hide();
formateSelectRegister('authText', lmdata(id));
display('authParams', lmtext(id));
}
function formateSelectRegister(id, value) {
formateSelect(id, ['AD=Active Directory', 'Demo=Demonstration', 'LDAP=LDAP', 'Null=None'], value);
}
function skinSelect(id) { function skinSelect(id) {
currentId = id; currentId = id;
changeSkinImage(lmdata(id)); changeSkinImage(lmdata(id));

View File

@ -304,7 +304,7 @@ sub struct {
portalCustomization => { portalCustomization => {
_nodes => [ _nodes => [
qw(portalSkin cn:portalSkinRules portalAutocomplete portalCheckLogins portalUserAttr portalOpenLinkInNewWindow portalAntiFrame portalPingInterval passwordManagement) qw(portalSkin cn:portalSkinRules portalButtons passwordManagement portalOther)
], ],
_help => 'portalcustom', _help => 'portalcustom',
@ -314,38 +314,50 @@ sub struct {
_js => 'hashRoot', _js => 'hashRoot',
_help => 'portalcustom', _help => 'portalcustom',
}, },
portalAutocomplete => 'bool:/portalAutocomplete', portalButtons => {
portalCheckLogins => 'bool:/portalCheckLogins',
portalUserAttr => 'text:/portalUserAttr',
portalOpenLinkInNewWindow =>
'bool:/portalOpenLinkInNewWindow',
portalAntiFrame => 'bool:/portalAntiFrame',
portalPingInterval => 'int:/portalPingInterval',
passwordManagement => {
_nodes => [ _nodes => [
qw(portalDisplayResetPassword portalRequireOldPassword hideOldPassword mailOnPasswordChange) qw/portalCheckLogins portalDisplayResetPassword portalDisplayRegister/
], ],
portalCheckLogins => 'bool:/portalCheckLogins',
portalDisplayResetPassword => portalDisplayResetPassword =>
'bool:/portalDisplayResetPassword', 'bool:/portalDisplayResetPassword',
portalDisplayRegister => 'bool:/portalDisplayRegister',
},
passwordManagement => {
_nodes => [
qw(portalRequireOldPassword hideOldPassword mailOnPasswordChange)
],
portalRequireOldPassword => portalRequireOldPassword =>
'bool:/portalRequireOldPassword', 'bool:/portalRequireOldPassword',
hideOldPassword => 'bool:/hideOldPassword', hideOldPassword => 'bool:/hideOldPassword',
mailOnPasswordChange => 'bool:/mailOnPasswordChange', mailOnPasswordChange => 'bool:/mailOnPasswordChange',
}, },
portalOther => {
_nodes => [
qw/portalAutocomplete portalUserAttr portalOpenLinkInNewWindow portalAntiFrame portalPingInterval/
],
portalAutocomplete => 'bool:/portalAutocomplete',
portalUserAttr => 'text:/portalUserAttr',
portalOpenLinkInNewWindow =>
'bool:/portalOpenLinkInNewWindow',
portalAntiFrame => 'bool:/portalAntiFrame',
portalPingInterval => 'int:/portalPingInterval',
},
}, },
portalCaptcha => { portalCaptcha => {
_nodes => [ _nodes => [
qw(captcha_login_enabled captcha_mail_enabled captcha_size captcha_data captcha_output) qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled captcha_size captcha_data captcha_output)
], ],
captcha_login_enabled => 'bool:/captcha_login_enabled', captcha_login_enabled => 'bool:/captcha_login_enabled',
captcha_mail_enabled => 'bool:/captcha_mail_enabled', captcha_mail_enabled => 'bool:/captcha_mail_enabled',
captcha_size => 'int:/captcha_size', captcha_register_enabled =>
captcha_data => 'text:/captcha_data', 'bool:/captcha_register_enabled',
captcha_output => 'text:/captcha_output', captcha_size => 'int:/captcha_size',
captcha_data => 'text:/captcha_data',
captcha_output => 'text:/captcha_output',
}, },
}, },
@ -930,7 +942,7 @@ sub struct {
# OTHER PARAMETERS # OTHER PARAMETERS
advancedParams => { advancedParams => {
_nodes => [ _nodes => [
qw(customFunctions n:soap n:loginHistory n:notifications n:passwordManagement n:security n:redirection n:portalRedirection n:specialHandlers cn:logoutServices) qw(customFunctions n:soap n:loginHistory n:notifications n:passwordManagement n:register n:security n:redirection n:portalRedirection n:specialHandlers cn:logoutServices)
], ],
_help => 'advanced', _help => 'advanced',
@ -1010,6 +1022,18 @@ sub struct {
}, },
}, },
register => {
_nodes => [
qw/registerDB registerUrl registerTimeout registerConfirmSubject registerDoneSubject/
],
_help => 'register',
registerDB => 'text:/registerDB:register:registerdbParams',
registerUrl => 'text:/registerUrl',
registerTimeout => 'int:/registerTimeout',
registerConfirmSubject => 'text:/registerConfirmSubject',
registerDoneSubject => 'text:/registerDoneSubject',
},
security => { security => {
_nodes => [ _nodes => [
qw(userControl portalForceAuthn key trustedDomains useSafeJail checkXSS) qw(userControl portalForceAuthn key trustedDomains useSafeJail checkXSS)
@ -1490,14 +1514,15 @@ sub testStruct {
}, },
msgFail => 'Bad module name', msgFail => 'Bad module name',
}, },
captcha_login_enabled => $boolean, captcha_login_enabled => $boolean,
captcha_mail_enabled => $boolean, captcha_mail_enabled => $boolean,
captcha_size => $integer, captcha_register_enabled => $boolean,
captcha_data => $testNotDefined, captcha_size => $integer,
captcha_output => $testNotDefined, captcha_data => $testNotDefined,
cda => $boolean, captcha_output => $testNotDefined,
checkXSS => $boolean, cda => $boolean,
cookieName => { checkXSS => $boolean,
cookieName => {
test => qr/^[a-zA-Z]\w*$/, test => qr/^[a-zA-Z]\w*$/,
msgFail => 'Bad cookie name', msgFail => 'Bad cookie name',
}, },
@ -1714,6 +1739,7 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
portalDisplayAppslist => { test => $perlExpr, }, portalDisplayAppslist => { test => $perlExpr, },
portalDisplayChangePassword => { test => $perlExpr, }, portalDisplayChangePassword => { test => $perlExpr, },
portalDisplayLogout => { test => $perlExpr, }, portalDisplayLogout => { test => $perlExpr, },
portalDisplayRegister => $boolean,
portalDisplayResetPassword => $boolean, portalDisplayResetPassword => $boolean,
portalForceAuthn => $boolean, portalForceAuthn => $boolean,
portalOpenLinkInNewWindow => $boolean, portalOpenLinkInNewWindow => $boolean,
@ -1745,7 +1771,12 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
keyTest => qr/^(?:none|authentificate|manager|)$/, keyTest => qr/^(?:none|authentificate|manager|)$/,
msgFail => 'must be one of none authentificate manager', msgFail => 'must be one of none authentificate manager',
}, },
reloadUrls => { registerConfirmSubject => $testNotDefined,
registerDB => $testNotDefined,
registerDoneSubject => $testNotDefined,
registerTimeout => $integer,
registerUrl => $testNotDefined,
reloadUrls => {
keyTest => $domainNameOrIp, keyTest => $domainNameOrIp,
test => Lemonldap::NG::Common::Regexp::HTTP_URI(), test => Lemonldap::NG::Common::Regexp::HTTP_URI(),
msgFail => 'Bad url' msgFail => 'Bad url'

View File

@ -112,6 +112,7 @@ sub en {
captcha_data => 'Directory for data', captcha_data => 'Directory for data',
captcha_login_enabled => 'Activation in login form', captcha_login_enabled => 'Activation in login form',
captcha_mail_enabled => 'Activation in password reset by mail form', captcha_mail_enabled => 'Activation in password reset by mail form',
captcha_register_enabled => 'Activation in register form',
captcha_output => 'Directory for images', captcha_output => 'Directory for images',
captcha_size => 'Size', captcha_size => 'Size',
CAS_authnLevel => 'Authentication level', CAS_authnLevel => 'Authentication level',
@ -285,6 +286,7 @@ sub en {
portal => 'URL', portal => 'URL',
portalAntiFrame => 'Anti frame protection', portalAntiFrame => 'Anti frame protection',
portalAutocomplete => 'Auto complete', portalAutocomplete => 'Auto complete',
portalButtons => 'Buttons on login page',
portalCaptcha => 'Captcha', portalCaptcha => 'Captcha',
portalCheckLogins => 'Check last logins', portalCheckLogins => 'Check last logins',
portalCustomization => 'Customization', portalCustomization => 'Customization',
@ -292,11 +294,13 @@ sub en {
portalDisplayChangePassword => 'Password change', portalDisplayChangePassword => 'Password change',
portalDisplayLoginHistory => 'Login History', portalDisplayLoginHistory => 'Login History',
portalDisplayLogout => 'Logout', portalDisplayLogout => 'Logout',
portalDisplayRegister => 'Register new account',
portalDisplayResetPassword => 'Reset password', portalDisplayResetPassword => 'Reset password',
portalForceAuthn => 'Force authentication', portalForceAuthn => 'Force authentication',
portalMenu => 'Menu', portalMenu => 'Menu',
portalModules => 'Modules activation', portalModules => 'Modules activation',
portalOpenLinkInNewWindow => 'New window', portalOpenLinkInNewWindow => 'New window',
portalOther => 'Other',
portalParams => 'Portal', portalParams => 'Portal',
portalPingInterval => 'Ping Interval', portalPingInterval => 'Ping Interval',
portalRedirection => 'Portal redirections', portalRedirection => 'Portal redirections',
@ -313,6 +317,12 @@ sub en {
radiusServer => 'Server hostname', radiusServer => 'Server hostname',
randomPasswordRegexp => 'Regexp for password generation', randomPasswordRegexp => 'Regexp for password generation',
redirection => 'Handler redirections', redirection => 'Handler redirections',
register => 'Register new account',
registerConfirmSubject => 'Subject for confirmation mail',
registerDB => 'Module',
registerDoneSubject => 'Subject for done mail',
registerTimeout => 'Validity time of a register request',
registerUrl => 'Page URL',
reloadUrls => 'Configuration reload', reloadUrls => 'Configuration reload',
remoteCookieName => 'Cookie name', remoteCookieName => 'Cookie name',
remoteGlobalStorage => 'Sessions module', remoteGlobalStorage => 'Sessions module',
@ -602,6 +612,8 @@ sub fr {
"Activation dans le formulaire d'authentification", "Activation dans le formulaire d'authentification",
captcha_mail_enabled => captcha_mail_enabled =>
'Activation dans le formulaire de réinitialisation par mail', 'Activation dans le formulaire de réinitialisation par mail',
captcha_register_enabled =>
'Activation dans le formulaire de création de compte',
captcha_output => 'Répertoire des images', captcha_output => 'Répertoire des images',
captcha_size => 'Taille', captcha_size => 'Taille',
CAS_authnLevel => 'Niveau d\'authentification', CAS_authnLevel => 'Niveau d\'authentification',
@ -780,6 +792,7 @@ sub fr {
portal => 'URL', portal => 'URL',
portalAntiFrame => 'Protection anti frame', portalAntiFrame => 'Protection anti frame',
portalAutocomplete => 'Auto complétion', portalAutocomplete => 'Auto complétion',
portalButtons => 'Boutons sur la page de connexion',
portalCaptcha => 'Captcha', portalCaptcha => 'Captcha',
portalCheckLogins => 'Vérifier l\'historique', portalCheckLogins => 'Vérifier l\'historique',
portalCustomization => 'Personnalisation', portalCustomization => 'Personnalisation',
@ -787,11 +800,13 @@ sub fr {
portalDisplayChangePassword => 'Changement de mot de passe', portalDisplayChangePassword => 'Changement de mot de passe',
portalDisplayLoginHistory => 'Historique des connexions', portalDisplayLoginHistory => 'Historique des connexions',
portalDisplayLogout => 'Déconnexion', portalDisplayLogout => 'Déconnexion',
portalDisplayRegister => 'Création d\'un nouveau compte',
portalDisplayResetPassword => 'Réinitialisation de mot de passe', portalDisplayResetPassword => 'Réinitialisation de mot de passe',
portalForceAuthn => 'Authentication forcée', portalForceAuthn => 'Authentication forcée',
portalMenu => 'Menu', portalMenu => 'Menu',
portalModules => 'Modules', portalModules => 'Modules',
portalOpenLinkInNewWindow => 'Nouvelle fenêtre', portalOpenLinkInNewWindow => 'Nouvelle fenêtre',
portalOther => 'Autres',
portalParams => 'Portail', portalParams => 'Portail',
portalPingInterval => 'Interval du ping', portalPingInterval => 'Interval du ping',
portalRedirection => 'Redirections du portail', portalRedirection => 'Redirections du portail',
@ -809,6 +824,12 @@ sub fr {
randomPasswordRegexp => randomPasswordRegexp =>
'Expression regulière pour la génération des mots de passe', 'Expression regulière pour la génération des mots de passe',
redirection => 'Redirections du Handler', redirection => 'Redirections du Handler',
register => 'Créer un nouveau compte',
registerConfirmSubject => 'Sujet du mail de confirmation',
registerDB => 'Module',
registerDoneSubject => 'Sujet du mail de prise en compte',
registerTimeout => 'Durée de validité de la requête',
registerUrl => 'URL de la page',
reloadUrls => 'Mise à jour de la configuration', reloadUrls => 'Mise à jour de la configuration',
remoteCookieName => 'Nom du cookie', remoteCookieName => 'Nom du cookie',
remoteGlobalStorage => 'Module des sessions', remoteGlobalStorage => 'Module des sessions',