From 525d43ade8b26ec27457e9fb5cc43241b6abe09d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Oudot?= Date: Wed, 11 Jun 2014 10:46:43 +0000 Subject: [PATCH] Update captcha parameters in Manager (#703) --- .../lib/Lemonldap/NG/Common/Conf/Serializer.pm | 7 ++++--- .../example/skins/default/js/manager.js | 1 + .../lib/Lemonldap/NG/Manager/_Struct.pm | 15 +++++++++++---- .../lib/Lemonldap/NG/Manager/_i18n.pm | 8 ++++---- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm index c3f1d2fe2..a0e2edd98 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm @@ -104,6 +104,7 @@ sub unserialize { $k =~ /^(?x: applicationList |authChoiceModules + |captchaStorageOptions |CAS_proxiedServices |casStorageOptions |dbiExportedVars @@ -113,7 +114,7 @@ sub unserialize { |facebookExportedVars |globalStorageOptions |googleExportedVars - |grantSessionRules + |grantSessionRules |groups |ldapExportedVars |localSessionStorageOptions @@ -125,7 +126,7 @@ sub unserialize { |persistentStorageOptions |portalSkinRules |post - |reloadUrls + |reloadUrls |remoteGlobalStorageOptions |samlIDPMetaDataExportedAttributes |samlIDPMetaDataOptions @@ -134,7 +135,7 @@ sub unserialize { |samlSPMetaDataOptions |samlSPMetaDataXML |samlStorageOptions - |sessionDataToRemember + |sessionDataToRemember |slaveExportedVars |vhostOptions |webIDExportedVars diff --git a/lemonldap-ng-manager/example/skins/default/js/manager.js b/lemonldap-ng-manager/example/skins/default/js/manager.js index 1b1481675..98bf0e69d 100644 --- a/lemonldap-ng-manager/example/skins/default/js/manager.js +++ b/lemonldap-ng-manager/example/skins/default/js/manager.js @@ -33,6 +33,7 @@ var helpCh = { 'authTwitter': '/pages/documentation/current/authtwitter.html', 'authWebID': '/pages/documentation/current/authwebid.html', 'authYubikey': '/pages/documentation/current/authyubikey.html', + 'captcha': '/pages/documentation/current/captcha.html', 'cookies': '/pages/documentation/current/ssocookie.html', 'customfunctions': '/pages/documentation/current/customfunctions.html', 'default': '/pages/documentation/current/start.html#configuration', diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm index b95233f5e..53d3243ff 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm @@ -349,15 +349,22 @@ sub struct { portalCaptcha => { _nodes => [ - qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled captcha_size captcha_data captcha_output) + qw(captcha_login_enabled captcha_mail_enabled captcha_register_enabled captcha_size captchaStorage captchaStorageOptions) ], + _help => 'captcha', + captcha_login_enabled => 'bool:/captcha_login_enabled', captcha_mail_enabled => 'bool:/captcha_mail_enabled', captcha_register_enabled => 'bool:/captcha_register_enabled', - captcha_size => 'int:/captcha_size', - captcha_data => 'text:/captcha_data', - captcha_output => 'text:/captcha_output', + captcha_size => 'int:/captcha_size', + captchaStorage => 'text:/captchaStorage', + captchaStorageOptions => { + _nodes => ['hash:/captchaStorageOptions:captcha:btext'], + _js => 'hashRoot', + _help => 'captcha', + }, + }, }, diff --git a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm index b853ae646..7bc7f2ec7 100644 --- a/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm +++ b/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm @@ -109,12 +109,12 @@ sub en { demoExportedVars => 'Exported variables', demoParams => 'Demonstration parameters', done => 'done', - captcha_data => 'Directory for data', captcha_login_enabled => 'Activation in login form', captcha_mail_enabled => 'Activation in password reset by mail form', captcha_register_enabled => 'Activation in register form', - captcha_output => 'Directory for images', captcha_size => 'Size', + captchaStorage => 'Captcha module name', + captchaStorageOptions => 'Captcha module options', CAS_authnLevel => 'Authentication level', CAS_CAFile => 'CA file', CAS_gateway => 'Gateway authentication', @@ -609,15 +609,15 @@ sub fr { demoExportedVars => 'Variables exportées', demoParams => 'Paramètres démonstration', done => 'validée', - captcha_data => 'Répertoire des données', captcha_login_enabled => "Activation dans le formulaire d'authentification", captcha_mail_enabled => '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_size => 'Taille', + captchaStorage => 'Nom du module de stockage', + captchaStorageOptions => 'Options du module de stockage', CAS_authnLevel => 'Niveau d\'authentification', CAS_CAFile => 'Fichier d\'AC', CAS_gateway => 'Authentification transparente',