From: Benoît Pin Date: Wed, 3 Sep 2014 20:25:26 +0000 (+0200) Subject: Introduction du mode d'inscription anonyme avec mot de passe. X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/commitdiff_plain/5b1eddb70881d4dfd7a67c50b5b22e315927bf24?ds=sidebyside Introduction du mode d'inscription anonyme avec mot de passe. --- diff --git a/RegistrationTool.py b/RegistrationTool.py index e8262f9..61505d7 100644 --- a/RegistrationTool.py +++ b/RegistrationTool.py @@ -49,13 +49,16 @@ security = ModuleSecurityInfo('Products.Plinn.RegistrationTool') MODE_ANONYMOUS = 'anonymous' security.declarePublic('MODE_ANONYMOUS') +MODE_PASS_ANONYMOUS = 'pass_anonymous' +security.declarePublic('MODE_PASS_ANONYMOUS') + MODE_MANAGER = 'manager' security.declarePublic('MODE_MANAGER') MODE_REVIEWED = 'reviewed' security.declarePublic('MODE_REVIEWED') -MODES = [MODE_ANONYMOUS, MODE_MANAGER, MODE_REVIEWED] +MODES = [MODE_ANONYMOUS, MODE_PASS_ANONYMOUS, MODE_MANAGER, MODE_REVIEWED] security.declarePublic('MODES') DEFAULT_MEMBER_GROUP = 'members' @@ -126,7 +129,7 @@ class RegistrationTool(BaseRegistrationTool) : urlTool = getToolByName(self, 'portal_url') portal = urlTool.getPortalObject() - if mode in [MODE_ANONYMOUS, MODE_REVIEWED] : + if mode in [MODE_ANONYMOUS, MODE_PASS_ANONYMOUS, MODE_REVIEWED] : portal.manage_permission(AddPortalMember, roles = ['Anonymous', 'Manager'], acquire=1) elif mode == MODE_MANAGER : portal.manage_permission(AddPortalMember, roles = ['Manager', 'UserManager'], acquire=0) @@ -153,7 +156,7 @@ class RegistrationTool(BaseRegistrationTool) : p=Permission(AddPortalMember, [], portal) return p.getRoles() - if mode in [MODE_ANONYMOUS, MODE_REVIEWED] : + if mode in [MODE_ANONYMOUS, MODE_PASS_ANONYMOUS, MODE_REVIEWED] : if 'Anonymous' in rolesOfAddPortalMemberPerm() : return False elif mode == MODE_MANAGER : diff --git a/locales/en/LC_MESSAGES/plinn.mo b/locales/en/LC_MESSAGES/plinn.mo index a3b9f89..7109dab 100644 Binary files a/locales/en/LC_MESSAGES/plinn.mo and b/locales/en/LC_MESSAGES/plinn.mo differ diff --git a/locales/en/LC_MESSAGES/plinn.po b/locales/en/LC_MESSAGES/plinn.po index a3d5262..7b277e8 100644 --- a/locales/en/LC_MESSAGES/plinn.po +++ b/locales/en/LC_MESSAGES/plinn.po @@ -1,7 +1,7 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: Mon Sep 1 20:46:10 2014\n" +"POT-Creation-Date: Wed Sep 3 22:19:34 2014\n" "PO-Revision-Date: 2013-11-28 13:12+0100\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" @@ -24,27 +24,27 @@ msgstr "" msgid "Please rename each listed object." msgstr "" -#: n/RegistrationTool.py:228 +#: n/RegistrationTool.py:231 msgid "How to reset your password on the %s website" msgstr "" -#: n/RegistrationTool.py:243 +#: n/RegistrationTool.py:246 msgid "Unknown user name. Please retry." msgstr "" -#: n/RegistrationTool.py:258 +#: n/RegistrationTool.py:261 msgid "Invalid reset password request." msgstr "" -#: n/RegistrationTool.py:264 +#: n/RegistrationTool.py:267 msgid "Your reset password request has expired. You can ask a new one." msgstr "" -#: n/RegistrationTool.py:273 +#: n/RegistrationTool.py:276 msgid "Password successfully updated." msgstr "" -#: n/RegistrationTool.py:275 +#: n/RegistrationTool.py:278 msgid "\"%s\" username not found." msgstr "" @@ -471,7 +471,8 @@ msgstr "" #: n/skins/custom_generic/logged_in.py:50 #: n/skins/photo_theme/homepage_dispatcher.py:14 #: n/skins/photo_theme/homepage_dispatcher.py:17 -#: n/skins/photo_theme/homepage_dispatcher.py:20 +#: n/skins/photo_theme/homepage_dispatcher.py:25 +#: n/skins/photo_theme/homepage_dispatcher.py:28 msgid "Login success" msgstr "" @@ -671,7 +672,7 @@ msgstr "" #: n/skins/custom_generic/talkback_tree.pt:82 #: n/skins/generic/gruf_macros.pt:77 n/skins/generic/gruf_macros.pt:410 #: n/skins/generic/header_widgets.pt:32 n/skins/generic/header_widgets.pt:173 -#: n/skins/generic/send_email_form.pt:79 +#: n/skins/generic/send_email_form.pt:79 n/www/configureRegistrationTool.pt:43 msgid "Validate" msgstr "" @@ -1414,6 +1415,38 @@ msgstr "" msgid "(No description)" msgstr "" +#: n/www/configureRegistrationTool.pt:4 +msgid "Configure ${portal_calendar} Tool" +msgstr "" + +#: n/www/configureRegistrationTool.pt:6 +msgid "Select registration mode" +msgstr "" + +#: n/www/configureRegistrationTool.pt:11 +msgid "Anonymous registration" +msgstr "" + +#: n/www/configureRegistrationTool.pt:17 +msgid "Anonymous registration with password" +msgstr "" + +#: n/www/configureRegistrationTool.pt:23 +msgid "Portal manager registration" +msgstr "" + +#: n/www/configureRegistrationTool.pt:30 +msgid "Reviewed registration" +msgstr "" + +#: n/www/configureRegistrationTool.pt:34 +msgid "Workflow chain" +msgstr "" + +#: n/www/configureRegistrationTool.pt:39 +msgid "Role mapping mismatch : click Validate to solve this problem !" +msgstr "" + #: n/www/manage_solr.pt:4 msgid "Configure Solr delegated indexes" msgstr "" @@ -1477,9 +1510,6 @@ msgstr "" msgid "Advanced search" msgstr "" -msgid "Anonymous registration" -msgstr "" - msgid "Appointment" msgstr "" @@ -1603,9 +1633,6 @@ msgstr "" msgid "Comment" msgstr "" -msgid "Configure ${portal_calendar} Tool" -msgstr "" - msgid "Container block" msgstr "" @@ -1975,9 +2002,6 @@ msgstr "" msgid "Play" msgstr "" -msgid "Portal manager registration" -msgstr "" - msgid "Portal Role" msgstr "" @@ -2017,18 +2041,12 @@ msgstr "" msgid "retract_to_shared" msgstr "" -msgid "Reviewed registration" -msgstr "" - msgid "Reviewer" msgstr "" msgid "Role(s)" msgstr "" -msgid "Role mapping mismatch : click Validate to solve this problem !" -msgstr "" - msgid "Roles to assign:" msgstr "" @@ -2065,9 +2083,6 @@ msgstr "" msgid "Select Member(s) and a role(s) to assign:" msgstr "" -msgid "Select registration mode" -msgstr "" - msgid "September" msgstr "" @@ -2203,9 +2218,6 @@ msgstr "" msgid "Work" msgstr "" -msgid "Workflow chain" -msgstr "" - msgid "You are not allowed to delete: " msgstr "" diff --git a/locales/fr/LC_MESSAGES/plinn.mo b/locales/fr/LC_MESSAGES/plinn.mo index 0819851..0361d36 100644 Binary files a/locales/fr/LC_MESSAGES/plinn.mo and b/locales/fr/LC_MESSAGES/plinn.mo differ diff --git a/locales/fr/LC_MESSAGES/plinn.po b/locales/fr/LC_MESSAGES/plinn.po index 57d9248..4d6fb46 100755 --- a/locales/fr/LC_MESSAGES/plinn.po +++ b/locales/fr/LC_MESSAGES/plinn.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: Plinn 2.0\n" -"POT-Creation-Date: Mon Sep 1 20:46:10 2014\n" -"PO-Revision-Date: 2014-07-21 16:33+0200\n" +"POT-Creation-Date: Wed Sep 3 22:19:34 2014\n" +"PO-Revision-Date: 2014-09-03 22:22+0200\n" "Last-Translator: Benoît PIN\n" "Language-Team: CRI http://cri.ensmp.fr\n" "Language: \n" @@ -24,29 +24,29 @@ msgstr "Objet supprimé" msgid "Please rename each listed object." msgstr "Veuillez renommer tous les éléments listés." -#: n/RegistrationTool.py:228 +#: n/RegistrationTool.py:231 msgid "How to reset your password on the %s website" msgstr "Comment réinitialiser votre mot de passe sur le site %s" -#: n/RegistrationTool.py:243 +#: n/RegistrationTool.py:246 msgid "Unknown user name. Please retry." msgstr "Nom d'utilisateur inconnu. Veuillez réessayer." -#: n/RegistrationTool.py:258 +#: n/RegistrationTool.py:261 msgid "Invalid reset password request." msgstr "Demande de réinitialisation de mot de passe invalide." -#: n/RegistrationTool.py:264 +#: n/RegistrationTool.py:267 msgid "Your reset password request has expired. You can ask a new one." msgstr "" "Votre demande de réinitialisation de mot de passe a expiré. Vous pouvez en " "demander une nouvelle." -#: n/RegistrationTool.py:273 +#: n/RegistrationTool.py:276 msgid "Password successfully updated." msgstr "Mot de passe correctement mis à jour." -#: n/RegistrationTool.py:275 +#: n/RegistrationTool.py:278 msgid "\"%s\" username not found." msgstr "Nom : « %s » non trouvé." @@ -481,7 +481,8 @@ msgstr "Échec de la connexion" #: n/skins/custom_generic/logged_in.py:50 #: n/skins/photo_theme/homepage_dispatcher.py:14 #: n/skins/photo_theme/homepage_dispatcher.py:17 -#: n/skins/photo_theme/homepage_dispatcher.py:20 +#: n/skins/photo_theme/homepage_dispatcher.py:25 +#: n/skins/photo_theme/homepage_dispatcher.py:28 msgid "Login success" msgstr "Connexion réussie" @@ -705,7 +706,7 @@ msgstr "Corps" #: n/skins/custom_generic/talkback_tree.pt:82 #: n/skins/generic/gruf_macros.pt:77 n/skins/generic/gruf_macros.pt:410 #: n/skins/generic/header_widgets.pt:32 n/skins/generic/header_widgets.pt:173 -#: n/skins/generic/send_email_form.pt:79 +#: n/skins/generic/send_email_form.pt:79 n/www/configureRegistrationTool.pt:43 msgid "Validate" msgstr "Valider" @@ -1483,6 +1484,40 @@ msgstr "(Sans titre)" msgid "(No description)" msgstr "(Sans description)" +#: n/www/configureRegistrationTool.pt:4 +msgid "Configure ${portal_calendar} Tool" +msgstr "Configurer l'outil ${portal_calendar}" + +#: n/www/configureRegistrationTool.pt:6 +msgid "Select registration mode" +msgstr "Sélectionner le mode d'inscription" + +#: n/www/configureRegistrationTool.pt:11 +msgid "Anonymous registration" +msgstr "Inscription anonyme" + +#: n/www/configureRegistrationTool.pt:17 +msgid "Anonymous registration with password" +msgstr "Inscription anonyme avec mot de passe" + +#: n/www/configureRegistrationTool.pt:23 +msgid "Portal manager registration" +msgstr "Inscription par l'administrateur" + +#: n/www/configureRegistrationTool.pt:30 +msgid "Reviewed registration" +msgstr "Inscription modérée" + +#: n/www/configureRegistrationTool.pt:34 +msgid "Workflow chain" +msgstr "Séquence de workflow" + +#: n/www/configureRegistrationTool.pt:39 +msgid "Role mapping mismatch : click Validate to solve this problem !" +msgstr "" +"Paramétrage des rôles non concordant, cliquer sur Valider pour résoudre le " +"problème !" + #: n/www/manage_solr.pt:4 msgid "Configure Solr delegated indexes" msgstr "Configurer les index délégués à Solr" @@ -1545,9 +1580,6 @@ msgstr "Ajouter un nœud" msgid "Advanced search" msgstr "Recherche avancée" -msgid "Anonymous registration" -msgstr "Inscription anonyme" - msgid "Appointment" msgstr "Rendez-vous" @@ -1671,9 +1703,6 @@ msgstr "Condenser" msgid "Comment" msgstr "Commenter" -msgid "Configure ${portal_calendar} Tool" -msgstr "Configurer l'outil ${portal_calendar}" - msgid "Container block" msgstr "Conteneur" @@ -2048,9 +2077,6 @@ msgstr "personnes sélectionnées" msgid "Play" msgstr "Lecture" -msgid "Portal manager registration" -msgstr "Inscription par l'administrateur" - msgid "Portal Role" msgstr "Rôle du portail" @@ -2090,20 +2116,12 @@ msgstr "retirer" msgid "retract_to_shared" msgstr "retirer" -msgid "Reviewed registration" -msgstr "Inscription modérée" - msgid "Reviewer" msgstr "Modérateur" msgid "Role(s)" msgstr "Rôle(s)" -msgid "Role mapping mismatch : click Validate to solve this problem !" -msgstr "" -"Paramétrage des rôles non concordant, cliquer sur Valider pour résoudre le " -"problème !" - msgid "Roles to assign:" msgstr "Rôles à assigner" @@ -2140,9 +2158,6 @@ msgstr "Sélectionner le type de dossier à construire :" msgid "Select Member(s) and a role(s) to assign:" msgstr "Sélectionner le(s) membre(s) et le(s) rôle(s) à assigner :" -msgid "Select registration mode" -msgstr "Sélectionner le mode d'inscription" - msgid "September" msgstr "Septembre" @@ -2280,9 +2295,6 @@ msgstr "larg. / haut. :" msgid "Work" msgstr "Travail" -msgid "Workflow chain" -msgstr "Séquence de workflow" - msgid "You are not allowed to delete: " msgstr "Vous n'êtes pas autorisé à supprimer : " diff --git a/locales/plinn-manual.pot b/locales/plinn-manual.pot index 8a37572..5288900 100644 --- a/locales/plinn-manual.pot +++ b/locales/plinn-manual.pot @@ -54,9 +54,6 @@ msgstr "" msgid "Advanced search" msgstr "" -msgid "Anonymous registration" -msgstr "" - msgid "Appointment" msgstr "" @@ -180,9 +177,6 @@ msgstr "" msgid "Comment" msgstr "" -msgid "Configure ${portal_calendar} Tool" -msgstr "" - msgid "Container block" msgstr "" @@ -552,9 +546,6 @@ msgstr "" msgid "Play" msgstr "" -msgid "Portal manager registration" -msgstr "" - msgid "Portal Role" msgstr "" @@ -594,18 +585,12 @@ msgstr "" msgid "retract_to_shared" msgstr "" -msgid "Reviewed registration" -msgstr "" - msgid "Reviewer" msgstr "" msgid "Role(s)" msgstr "" -msgid "Role mapping mismatch : click Validate to solve this problem !" -msgstr "" - msgid "Roles to assign:" msgstr "" @@ -642,9 +627,6 @@ msgstr "" msgid "Select Member(s) and a role(s) to assign:" msgstr "" -msgid "Select registration mode" -msgstr "" - msgid "September" msgstr "" @@ -781,9 +763,6 @@ msgstr "" msgid "Work" msgstr "" -msgid "Workflow chain" -msgstr "" - msgid "You are not allowed to delete: " msgstr "" diff --git a/locales/plinn.pot b/locales/plinn.pot index 6a530b9..a6f3bb4 100644 --- a/locales/plinn.pot +++ b/locales/plinn.pot @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.0 beta 1\n" -"POT-Creation-Date: Mon Sep 1 20:46:10 2014\n" +"POT-Creation-Date: Wed Sep 3 22:20:58 2014\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Zope 3 Developers \n" @@ -31,27 +31,27 @@ msgstr "" msgid "Please rename each listed object." msgstr "" -#: n/RegistrationTool.py:228 +#: n/RegistrationTool.py:231 msgid "How to reset your password on the %s website" msgstr "" -#: n/RegistrationTool.py:243 +#: n/RegistrationTool.py:246 msgid "Unknown user name. Please retry." msgstr "" -#: n/RegistrationTool.py:258 +#: n/RegistrationTool.py:261 msgid "Invalid reset password request." msgstr "" -#: n/RegistrationTool.py:264 +#: n/RegistrationTool.py:267 msgid "Your reset password request has expired. You can ask a new one." msgstr "" -#: n/RegistrationTool.py:273 +#: n/RegistrationTool.py:276 msgid "Password successfully updated." msgstr "" -#: n/RegistrationTool.py:275 +#: n/RegistrationTool.py:278 msgid "\"%s\" username not found." msgstr "" @@ -487,7 +487,8 @@ msgstr "" #: n/skins/custom_generic/logged_in.py:50 #: n/skins/photo_theme/homepage_dispatcher.py:14 #: n/skins/photo_theme/homepage_dispatcher.py:17 -#: n/skins/photo_theme/homepage_dispatcher.py:20 +#: n/skins/photo_theme/homepage_dispatcher.py:25 +#: n/skins/photo_theme/homepage_dispatcher.py:28 msgid "Login success" msgstr "" @@ -676,6 +677,7 @@ msgstr "" #: n/skins/generic/header_widgets.pt:32 #: n/skins/generic/header_widgets.pt:173 #: n/skins/generic/send_email_form.pt:79 +#: n/www/configureRegistrationTool.pt:43 msgid "Validate" msgstr "" @@ -1421,6 +1423,38 @@ msgstr "" msgid "(No description)" msgstr "" +#: n/www/configureRegistrationTool.pt:4 +msgid "Configure ${portal_calendar} Tool" +msgstr "" + +#: n/www/configureRegistrationTool.pt:6 +msgid "Select registration mode" +msgstr "" + +#: n/www/configureRegistrationTool.pt:11 +msgid "Anonymous registration" +msgstr "" + +#: n/www/configureRegistrationTool.pt:17 +msgid "Anonymous registration with password" +msgstr "" + +#: n/www/configureRegistrationTool.pt:23 +msgid "Portal manager registration" +msgstr "" + +#: n/www/configureRegistrationTool.pt:30 +msgid "Reviewed registration" +msgstr "" + +#: n/www/configureRegistrationTool.pt:34 +msgid "Workflow chain" +msgstr "" + +#: n/www/configureRegistrationTool.pt:39 +msgid "Role mapping mismatch : click Validate to solve this problem !" +msgstr "" + #: n/www/manage_solr.pt:4 msgid "Configure Solr delegated indexes" msgstr "" @@ -1485,9 +1519,6 @@ msgstr "" msgid "Advanced search" msgstr "" -msgid "Anonymous registration" -msgstr "" - msgid "Appointment" msgstr "" @@ -1611,9 +1642,6 @@ msgstr "" msgid "Comment" msgstr "" -msgid "Configure ${portal_calendar} Tool" -msgstr "" - msgid "Container block" msgstr "" @@ -1983,9 +2011,6 @@ msgstr "" msgid "Play" msgstr "" -msgid "Portal manager registration" -msgstr "" - msgid "Portal Role" msgstr "" @@ -2025,18 +2050,12 @@ msgstr "" msgid "retract_to_shared" msgstr "" -msgid "Reviewed registration" -msgstr "" - msgid "Reviewer" msgstr "" msgid "Role(s)" msgstr "" -msgid "Role mapping mismatch : click Validate to solve this problem !" -msgstr "" - msgid "Roles to assign:" msgstr "" @@ -2073,9 +2092,6 @@ msgstr "" msgid "Select Member(s) and a role(s) to assign:" msgstr "" -msgid "Select registration mode" -msgstr "" - msgid "September" msgstr "" @@ -2212,9 +2228,6 @@ msgstr "" msgid "Work" msgstr "" -msgid "Workflow chain" -msgstr "" - msgid "You are not allowed to delete: " msgstr "" diff --git a/www/configureRegistrationTool.zpt b/www/configureRegistrationTool.zpt index 073e279..1746408 100644 --- a/www/configureRegistrationTool.zpt +++ b/www/configureRegistrationTool.zpt @@ -5,17 +5,41 @@

Select registration mode

-
-
+ +
+ +
+ +
-
+ +
Workflow chain
- +
Role mapping mismatch : click Validate to solve this problem !
+ tal:condition="here/roleMappingMismatch"> + Role mapping mismatch : click Validate to solve this problem ! +