Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
97e63f46
Commit
97e63f46
authored
Jan 04, 2021
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_credential: test that credential recoveries can't be bypassed
parent
47059571
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.py
...ateItem/portal_components/test.erp5.testERP5Credential.py
+19
-1
No files found.
bt5/erp5_credential/TestTemplateItem/portal_components/test.erp5.testERP5Credential.py
View file @
97e63f46
...
...
@@ -30,7 +30,7 @@ import unittest
from
Products.ERP5Type.tests.utils
import
reindex
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
DummyMailHost
from
Products.ERP5Type.tests.Sequence
import
SequenceList
from
Products.ERP5Type.tests.Sequence
import
Sequence
,
Sequence
List
from
DateTime
import
DateTime
import
email
,
re
from
email.header
import
decode_header
,
make_header
...
...
@@ -1444,6 +1444,24 @@ class TestERP5Credential(ERP5TypeTestCase):
self.assertEqual(cr.getDefaultAddressCity(), None)
self.assertEqual(cr.getDefaultAddressRegion(), None)
def test_credential_recovery_cant_be_bypassed(self):
""" PasswordTool provides a basic functionality of credential recovery,
that is extended by Credential Recoveries. But if Credential Recovereries
exist (iow, the bt5 for this features is installed), PasswordTool should
not provide a way to bypass Credential Recoveries
"""
sequence = Sequence()
self.stepCreatePerson(sequence)
self.tic()
with self.assertRaisesRegexp(
RuntimeError,
"
Password
Recovery
should
be
done
via
Credential
Request
"
):
self.portal.portal_password.mailPasswordResetRequest(
user_login=sequence['login_reference'],
REQUEST=self.app.REQUEST,
came_from="
/
",
)
def test_suite():
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment