Products.PasswordStrength 0.5.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. Products/PasswordStrength/__init__.py +26 -0
  2. Products/PasswordStrength/configure.zcml +37 -0
  3. Products/PasswordStrength/interfaces.py +7 -0
  4. Products/PasswordStrength/locales/Products.PasswordStrength.pot +71 -0
  5. Products/PasswordStrength/locales/de/LC_MESSAGES/Products.PasswordStrength.po +71 -0
  6. Products/PasswordStrength/locales/es/LC_MESSAGES/Products.PasswordStrength.po +74 -0
  7. Products/PasswordStrength/locales/fr/LC_MESSAGES/Products.PasswordStrength.po +72 -0
  8. Products/PasswordStrength/overrides/Products.CMFPlone.browser.login.templates.pwreset_form.pt +141 -0
  9. Products/PasswordStrength/plugin.py +250 -0
  10. Products/PasswordStrength/profiles/default/browserlayer.xml +7 -0
  11. Products/PasswordStrength/profiles/default/metadata.xml +4 -0
  12. Products/PasswordStrength/profiles/default/skins.xml +12 -0
  13. Products/PasswordStrength/profiles/uninstall/browserlayer.xml +7 -0
  14. Products/PasswordStrength/profiles.zcml +36 -0
  15. Products/PasswordStrength/setuphandlers.py +109 -0
  16. Products/PasswordStrength/testing.py +61 -0
  17. Products/PasswordStrength/tests/__init__.py +0 -0
  18. Products/PasswordStrength/tests/backward_robot.py +25 -0
  19. Products/PasswordStrength/tests/password.robot +218 -0
  20. Products/PasswordStrength/tests/robot_setup.py +18 -0
  21. Products/PasswordStrength/tests/test_robot.py +14 -0
  22. Products/PasswordStrength/tests/test_setup.py +42 -0
  23. Products/PasswordStrength/www/passwordStrengthAdd.zpt +45 -0
  24. Products.PasswordStrength-0.5.0-py3.9-nspkg.pth +1 -0
  25. Products.PasswordStrength-0.5.0.dist-info/LICENSE.txt +27 -0
  26. Products.PasswordStrength-0.5.0.dist-info/METADATA +182 -0
  27. Products.PasswordStrength-0.5.0.dist-info/RECORD +31 -0
  28. Products.PasswordStrength-0.5.0.dist-info/WHEEL +5 -0
  29. Products.PasswordStrength-0.5.0.dist-info/entry_points.txt +2 -0
  30. Products.PasswordStrength-0.5.0.dist-info/namespace_packages.txt +1 -0
  31. Products.PasswordStrength-0.5.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,26 @@
1
+
2
+ """PasswordStrength
3
+ """
4
+
5
+ __author__ = "Dylan Jay <software@pretaweb.com"
6
+
7
+ from AccessControl.Permissions import add_user_folders
8
+ from Products.PluggableAuthService import registerMultiPlugin
9
+ from zope.i18nmessageid import MessageFactory
10
+ _ = MessageFactory("Products.PasswordStrength")
11
+ from Products.PasswordStrength.plugin import PasswordStrength, manage_addPasswordStrength, manage_addPasswordStrengthForm
12
+
13
+
14
+ def initialize(context):
15
+ """Initialize the PasswordStrength plugin."""
16
+ registerMultiPlugin(PasswordStrength.meta_type)
17
+
18
+ context.registerClass(PasswordStrength,
19
+ permission=add_user_folders,
20
+ constructors=(manage_addPasswordStrengthForm,
21
+ manage_addPasswordStrength),
22
+ #icon='www/noduplicatelogin.png',
23
+ visibility=None,
24
+ )
25
+
26
+ PROJECTNAME = "PasswordStrength"
@@ -0,0 +1,37 @@
1
+ <configure
2
+ xmlns="http://namespaces.zope.org/zope"
3
+ xmlns:i18n="http://namespaces.zope.org/i18n"
4
+ xmlns:zcml="http://namespaces.zope.org/zcml"
5
+ xmlns:monkey="http://namespaces.plone.org/monkey"
6
+ xmlns:browser="http://namespaces.zope.org/browser"
7
+ i18n_domain="Products.PasswordStrength">
8
+
9
+ <include file="profiles.zcml" />
10
+
11
+ <include package="z3c.jbot" file="meta.zcml" />
12
+ <browser:jbot
13
+ directory="overrides"
14
+ layer="Products.PasswordStrength.interfaces.IPasswordStrengthLayer"
15
+ />
16
+
17
+ <include package="collective.monkeypatcher" file="meta.zcml" />
18
+
19
+ <monkey:patch
20
+ description="Skip password validity for generated passwords"
21
+ class="Products.CMFPlone.RegistrationTool.RegistrationTool"
22
+ original="testPasswordValidity"
23
+ replacement=".plugin.testPasswordValidity"
24
+ docstringWarning="true"
25
+ />
26
+
27
+ <monkey:patch
28
+ description="Mark generated password"
29
+ class="Products.CMFPlone.RegistrationTool.RegistrationTool"
30
+ original="generatePassword"
31
+ replacement=".plugin.generatePassword"
32
+ docstringWarning="true"
33
+ />
34
+
35
+ <i18n:registerTranslations directory="locales" />
36
+
37
+ </configure>
@@ -0,0 +1,7 @@
1
+ """Module where all interfaces, events and exceptions live."""
2
+
3
+ from zope.publisher.interfaces.browser import IDefaultBrowserLayer
4
+
5
+
6
+ class IPasswordStrengthLayer(IDefaultBrowserLayer):
7
+ """Marker interface that defines a browser layer."""
@@ -0,0 +1,71 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Products.PasswordStrength\n"
4
+ "POT-Creation-Date: 2014-07-03 13:29+0000\n"
5
+ "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
6
+ "Last-Translator: S Geulette <support@imio.be>\n"
7
+ "Language-Team: LANGUAGE <LL@li.org>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "Plural-Forms: nplurals=1; plural=0\n"
12
+ "Language-Code: en\n"
13
+ "Language-Name: English\n"
14
+ "Preferred-Encodings: utf-8 latin1\n"
15
+ "Domain: Products.PasswordStrength\n"
16
+
17
+ #. Default: "Add"
18
+ #: ../www/passwordStrengthAdd.zpt:37
19
+ msgid " Add "
20
+ msgstr ""
21
+
22
+ #: ../www/passwordStrengthAdd.zpt:6
23
+ msgid "A plugin that rejects passwords that don't conform to a certain strength"
24
+ msgstr ""
25
+
26
+ #: ../plugin.py:31
27
+ msgid "Create your own rules for enforcing password strength"
28
+ msgstr ""
29
+
30
+ #: ../plugin.py:79
31
+ msgid "Minimum 1 capital letter"
32
+ msgstr ""
33
+
34
+ #: ../plugin.py:80
35
+ msgid "Minimum 1 lower case letter"
36
+ msgstr ""
37
+
38
+ #: ../plugin.py:82
39
+ msgid "Minimum 1 non-alpha character"
40
+ msgstr ""
41
+
42
+ #: ../plugin.py:81
43
+ msgid "Minimum 1 number"
44
+ msgstr ""
45
+
46
+ #: ../plugin.py:80
47
+ msgid "Minimum 10 characters"
48
+ msgstr ""
49
+
50
+ #: ../plugin.py:207
51
+ msgid "This password doesn't match requirements for passwords"
52
+ msgstr ""
53
+
54
+ #: ./backward.py:17
55
+ msgid "Your password and confirmation did not match. Please try again."
56
+ msgstr ""
57
+
58
+ #: ./backward.py:20
59
+ msgid "You must enter a password"
60
+ msgstr ""
61
+
62
+ #. Default: "Password Strength Plugin"
63
+ #: ../configure.zcml
64
+ msgid "Password Strength Plugin"
65
+ msgstr ""
66
+
67
+ #. Default: "PAS plugin that ensures strong passwords."
68
+ #: ../configure.zcml
69
+ msgid "PAS plugin that ensures strong passwords."
70
+ msgstr ""
71
+
@@ -0,0 +1,71 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Products.PasswordStrength\n"
4
+ "POT-Creation-Date: 2015-07-03 13:29+0000\n"
5
+ "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
6
+ "Last-Translator: Steffen Lindner <lindner@starzel.de\n"
7
+ "Language-Team: LANGUAGE <LL@li.org>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "Plural-Forms: nplurals=1; plural=0\n"
12
+ "Language-Code: de\n"
13
+ "Language-Name: Germany\n"
14
+ "Preferred-Encodings: utf-8 latin1\n"
15
+ "Domain: Products.PasswordStrength\n"
16
+
17
+ #. Default: "Add"
18
+ #: ../www/passwordStrengthAdd.zpt:37
19
+ msgid " Add "
20
+ msgstr " Hinzufügen "
21
+
22
+ #: ../www/passwordStrengthAdd.zpt:6
23
+ msgid "A plugin that rejects passwords that don't conform to a certain strength"
24
+ msgstr "Ein Plugin welches keine unsichere Passwörter zulässt."
25
+
26
+ #: ../plugin.py:31
27
+ msgid "Create your own rules for enforcing password strength"
28
+ msgstr "Erstelle deine eigenen Passwort regeln"
29
+
30
+ #: ../plugin.py:79
31
+ msgid "Minimum 1 capital letter"
32
+ msgstr "Mindestens ein Grossbuchstabe"
33
+
34
+ #: ../plugin.py:80
35
+ msgid "Minimum 1 lower case letter"
36
+ msgstr "Mindestens ein Kleinbuchstabe"
37
+
38
+ #: ../plugin.py:82
39
+ msgid "Minimum 1 non-alpha character"
40
+ msgstr "Mindestens ein Sonderzeichen"
41
+
42
+ #: ../plugin.py:81
43
+ msgid "Minimum 1 number"
44
+ msgstr "Mindestens eine Nummer"
45
+
46
+ #: ../plugin.py:80
47
+ msgid "Minimum 10 characters"
48
+ msgstr "Mindestens 10 Zeichen"
49
+
50
+ #. Default: "PAS plugin that ensures strong passwords."
51
+ #: ../configure.zcml
52
+ msgid "PAS plugin that ensures strong passwords."
53
+ msgstr "Module PAS proposant une politique forte des mots de passes"
54
+
55
+ #. Default: "Password Strength Plugin"
56
+ #: ../configure.zcml
57
+ msgid "Password Strength Plugin"
58
+ msgstr "Module Password Strength"
59
+
60
+ #: ../plugin.py:207
61
+ msgid "This password doesn't match requirements for passwords"
62
+ msgstr "Dieses Passwort entspricht nicht den Passwort Vorgaben"
63
+
64
+ #: ./backward.py:20
65
+ msgid "You must enter a password"
66
+ msgstr "Sie müssen ein Passwort eingeben"
67
+
68
+ #: ./backward.py:17
69
+ msgid "Your password and confirmation did not match. Please try again."
70
+ msgstr "Dein Passwort und deine Bestätigung stimmen nicht überein. Bitte versuch es nochmal."
71
+
@@ -0,0 +1,74 @@
1
+ # Leonardo J. Caballero G. <leonardocaballero@gmail.com>, 2014 - 2015.
2
+ msgid ""
3
+ msgstr ""
4
+ "Project-Id-Version: Products.PasswordStrength\n"
5
+ "POT-Creation-Date: 2014-07-03 13:29+0000\n"
6
+ "PO-Revision-Date: 2015-06-04 16:32-0430\n"
7
+ "Last-Translator: Leonardo J. Caballero G. <leonardocaballero@gmail.com>\n"
8
+ "Language-Team: ES <LL@li.org>\n"
9
+ "Language: es\n"
10
+ "MIME-Version: 1.0\n"
11
+ "Content-Type: text/plain; charset=utf-8\n"
12
+ "Content-Transfer-Encoding: 8bit\n"
13
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
14
+ "Language-Code: es\n"
15
+ "Language-Name: Spanish\n"
16
+ "Preferred-Encodings: utf-8 latin1\n"
17
+ "Domain: Products.PasswordStrength\n"
18
+ "X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n"
19
+
20
+ #. Default: "Add"
21
+ #: ../www/passwordStrengthAdd.zpt:37
22
+ msgid " Add "
23
+ msgstr " Agregar "
24
+
25
+ #: ../www/passwordStrengthAdd.zpt:6
26
+ msgid "A plugin that rejects passwords that don't conform to a certain strength"
27
+ msgstr ""
28
+ "Un plugin que rechaza contraseñas que no estén conformen con cierto criterio"
29
+
30
+ #: ../plugin.py:31
31
+ msgid "Create your own rules for enforcing password strength"
32
+ msgstr "Cree su propia regla para forzar al uso de contraseñas fuertes"
33
+
34
+ #: ../plugin.py:79
35
+ msgid "Minimum 1 capital letter"
36
+ msgstr "Mínimo 1 letra capital."
37
+
38
+ #: ../plugin.py:80
39
+ msgid "Minimum 1 lower case letter"
40
+ msgstr "Mínimo 1 letra minúscula."
41
+
42
+ #: ../plugin.py:82
43
+ msgid "Minimum 1 non-alpha character"
44
+ msgstr "Mínimo 1 carácter no alfanumérico."
45
+
46
+ #: ../plugin.py:81
47
+ msgid "Minimum 1 number"
48
+ msgstr "Mínimo 1 numero."
49
+
50
+ #: ../plugin.py:80
51
+ msgid "Minimum 10 characters"
52
+ msgstr "Mínimo 10 caracteres."
53
+
54
+ #. Default: "PAS plugin that ensures strong passwords."
55
+ #: ../configure.zcml
56
+ msgid "PAS plugin that ensures strong passwords."
57
+ msgstr "Plugin PAS que asegura tener contraseñas fuertes."
58
+
59
+ #. Default: "Password Strength Plugin"
60
+ #: ../configure.zcml
61
+ msgid "Password Strength Plugin"
62
+ msgstr "Plugin para contraseñas fuertes"
63
+
64
+ #: ../plugin.py:207
65
+ msgid "This password doesn't match requirements for passwords"
66
+ msgstr "Esta contraseña no coinciden con los requerimientos para contraseñas"
67
+
68
+ #: ./backward.py:20
69
+ msgid "You must enter a password"
70
+ msgstr "Usted debe introducir una contraseña"
71
+
72
+ #: ./backward.py:17
73
+ msgid "Your password and confirmation did not match. Please try again."
74
+ msgstr "Su contraseña y su confirmación de contraseña no coinciden. Por favor, inténtelo de nuevo."
@@ -0,0 +1,72 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Products.PasswordStrength\n"
4
+ "POT-Creation-Date: 2014-07-03 13:29+0000\n"
5
+ "PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
6
+ "Last-Translator: Stephan Geulette <support@imio.be>\n"
7
+ "Language-Team: LANGUAGE <LL@li.org>\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=utf-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "Plural-Forms: nplurals=1; plural=0\n"
12
+ "Language-Code: fr\n"
13
+ "Language-Name: French\n"
14
+ "Preferred-Encodings: utf-8 latin1\n"
15
+ "Domain: Products.PasswordStrength\n"
16
+ "X-is-fallback-for: fr-be fr-ca fr-lu fr-mc fr-ch fr-fr\n"
17
+
18
+ #. Default: "Add"
19
+ #: ../www/passwordStrengthAdd.zpt:37
20
+ msgid " Add "
21
+ msgstr " Ajouter "
22
+
23
+ #: ../www/passwordStrengthAdd.zpt:6
24
+ msgid "A plugin that rejects passwords that don't conform to a certain strength"
25
+ msgstr "Un plugin qui rejète les mots de passe non correspondant à une politique"
26
+
27
+ #: ../plugin.py:31
28
+ msgid "Create your own rules for enforcing password strength"
29
+ msgstr "Créer vos propres règles pour renforcer les mots de passe"
30
+
31
+ #: ../plugin.py:79
32
+ msgid "Minimum 1 capital letter"
33
+ msgstr "Au moins 1 lettre majuscule"
34
+
35
+ #: ../plugin.py:80
36
+ msgid "Minimum 1 lower case letter"
37
+ msgstr "Au moins 1 lettre minuscule"
38
+
39
+ #: ../plugin.py:82
40
+ msgid "Minimum 1 non-alpha character"
41
+ msgstr "Au moins 1 caractère spécial"
42
+
43
+ #: ../plugin.py:81
44
+ msgid "Minimum 1 number"
45
+ msgstr "Au moins 1 chiffre"
46
+
47
+ #: ../plugin.py:80
48
+ msgid "Minimum 10 characters"
49
+ msgstr "Au moins 10 caractères"
50
+
51
+ #. Default: "PAS plugin that ensures strong passwords."
52
+ #: ../configure.zcml
53
+ msgid "PAS plugin that ensures strong passwords."
54
+ msgstr "Module PAS proposant une politique forte des mots de passes"
55
+
56
+ #. Default: "Password Strength Plugin"
57
+ #: ../configure.zcml
58
+ msgid "Password Strength Plugin"
59
+ msgstr "Module Password Strength"
60
+
61
+ #: ../plugin.py:207
62
+ msgid "This password doesn't match requirements for passwords"
63
+ msgstr "Ce mot de passe ne respecte pas les contraintes indiquées"
64
+
65
+ #: ./backward.py:20
66
+ msgid "You must enter a password"
67
+ msgstr "Veuillez saisir votre mot de passe"
68
+
69
+ #: ./backward.py:17
70
+ msgid "Your password and confirmation did not match. Please try again."
71
+ msgstr "Votre mot de passe et la confirmation ne correspondent pas. Veuillez réessayer"
72
+
@@ -0,0 +1,141 @@
1
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
2
+ xmlns:tal="http://xml.zope.org/namespaces/tal"
3
+ xmlns:metal="http://xml.zope.org/namespaces/metal"
4
+ xmlns:i18n="http://xml.zope.org/namespaces/i18n"
5
+ lang="en"
6
+ metal:use-macro="context/@@main_template/macros/master"
7
+ i18n:domain="plone">
8
+ <body>
9
+
10
+ <metal:custom_title fill-slot="content-title">
11
+ <h1 class="documentFirstHeading"
12
+ i18n:translate="heading_reset_password">Set your password</h1>
13
+ </metal:custom_title>
14
+
15
+ <metal:custom_desc fill-slot="content-description">
16
+ <div class="documentDescription"
17
+ i18n:translate="description_reset_password">
18
+ Please fill out the form below to set your password.
19
+ </div>
20
+ </metal:custom_desc>
21
+
22
+ <metal:content-core fill-slot="content-core">
23
+ <metal:content-core define-macro="content-core" tal:define="errors view/getErrors">
24
+
25
+ <form class="enableAutoFocus"
26
+ name="pwreset_action"
27
+ method="post"
28
+ tal:attributes="action request/getURL">
29
+ <fieldset>
30
+ <legend i18n:translate="legend_new_password">New Password</legend>
31
+ <input type="hidden"
32
+ name="randomstring"
33
+ value=""
34
+ tal:attributes="value options/randomstring | request/randomstring | nothing" />
35
+
36
+ <div class="mb-3 field"
37
+ tal:define="error errors/userid | nothing;
38
+ use_email_as_login python:context.portal_registry['plone.use_email_as_login'];"
39
+ tal:attributes="class python:error and 'mb-3 field error' or 'mb-3 field'"
40
+ tal:condition="here/portal_password_reset/checkUser | nothing">
41
+
42
+ <tal:username tal:condition="not:use_email_as_login">
43
+ <label class="form-label" for="userid"
44
+ i18n:translate="label_my_user_name_is">My user name is</label>
45
+
46
+ <input class="form-control"
47
+ name="userid"
48
+ required
49
+ id="userid" />
50
+
51
+ <div tal:content="error" class="invalid-feedback">Validation error output</div>
52
+
53
+ <small class="formHelp text-muted" i18n:translate="help_userid">
54
+ Enter your user name for verification.
55
+ </small>
56
+ </tal:username>
57
+
58
+ <tal:email tal:condition="use_email_as_login">
59
+ <label class="form-label required" for="userid"
60
+ i18n:translate="label_my_email_address_is">My email address is</label>
61
+
62
+ <input class="form-control"
63
+ name="userid"
64
+ required
65
+ id="userid" />
66
+
67
+ <div tal:content="error" class="invalid-feedback">Validation error output</div>
68
+
69
+ <small class="formHelp text-muted" i18n:translate="help_verify_email">
70
+ Enter your email address for verification.
71
+ </small>
72
+ </tal:email>
73
+
74
+ </div>
75
+
76
+ <div class="mb-3 field"
77
+ tal:define="error errors/password | nothing;"
78
+ tal:attributes="class python:error and 'mb-3 field error' or 'mb-3 field'">
79
+
80
+ <label class="form-label required" for="password"
81
+ i18n:translate="label_new_password">New password</label>
82
+
83
+ <input class="form-control"
84
+ type="password"
85
+ id="password"
86
+ name="password"
87
+ required
88
+ size="10" />
89
+
90
+ <div tal:content="error" class="invalid-feedback">Validation error output</div>
91
+
92
+ <small class="formHelp text-muted"
93
+ tal:content="python:context.portal_registration.testPasswordValidity('')">
94
+ Enter your new password.
95
+ </small>
96
+
97
+ </div>
98
+
99
+ <div class="mb-3 field"
100
+ tal:define="error errors/password | nothing;"
101
+ tal:attributes="class python:error and 'mb-3 field error' or 'mb-3 field'">
102
+
103
+ <label class="form-label required" for="password2"
104
+ i18n:translate="label_confirm_password">Confirm password</label>
105
+
106
+ <input class="form-control"
107
+ type="password"
108
+ id="password2"
109
+ name="password2"
110
+ required
111
+ size="10"
112
+ />
113
+
114
+ <div tal:content="error" class="invalid-feedback">Validation error output</div>
115
+
116
+ <small class="formHelp text-muted" i18n:translate="help_confirm_password">
117
+ Re-enter the password. Make sure the passwords are identical.
118
+ </small>
119
+
120
+ </div>
121
+
122
+ <div>
123
+ <div class="label">&nbsp;</div>
124
+
125
+ <div class="mb-3 field">
126
+ <button class="btn btn-primary"
127
+ type="submit"
128
+ value="Set my password"
129
+ i18n:attributes="value">
130
+ <span i18n:translate="">Set my password</span>
131
+ </div>
132
+ </div>
133
+ <input type="hidden" name="form.submitted" value="1" />
134
+ </fieldset>
135
+ </form>
136
+
137
+ </metal:content-core>
138
+ </metal:content-core>
139
+
140
+ </body>
141
+ </html>