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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
6e304079
Commit
6e304079
authored
Dec 06, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_credential: raise an exception if login not found in mailPasswordResetRequest().
parent
e1598166
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRecovery_sendPasswordResetLink.py
...p5_credential/CredentialRecovery_sendPasswordResetLink.py
+1
-0
product/ERP5/Tool/PasswordTool.py
product/ERP5/Tool/PasswordTool.py
+9
-4
No files found.
bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/CredentialRecovery_sendPasswordResetLink.py
View file @
6e304079
...
...
@@ -25,4 +25,5 @@ portal.portal_password.mailPasswordResetRequest(user_login=reference,
REQUEST
=
context
.
REQUEST
,
notification_message
=
notification_message
,
store_as_event
=
portal
.
portal_preferences
.
isPreferredStoreEvents
(),
batch
=
True
,
**
kw
)
product/ERP5/Tool/PasswordTool.py
View file @
6e304079
...
...
@@ -114,7 +114,8 @@ class PasswordTool(BaseTool):
notification_message
=
None
,
sender
=
None
,
store_as_event
=
False
,
expiration_date
=
None
,
substitution_method_parameter_dict
=
None
):
substitution_method_parameter_dict
=
None
,
batch
=
False
):
"""
Create a random string and expiration date for request
Parameters:
...
...
@@ -162,6 +163,9 @@ class PasswordTool(BaseTool):
"User ${user} does not have an email address, please contact site "
"administrator directly"
,
mapping
=
{
'user'
:
user_login
})
if
msg
:
if
batch
:
raise
RuntimeError
(
msg
)
else
:
return
redirect
(
REQUEST
,
site_url
,
msg
)
key
=
self
.
getResetPasswordKey
(
user_login
=
user_login
,
...
...
@@ -209,6 +213,7 @@ class PasswordTool(BaseTool):
store_as_event
=
store_as_event
,
message_text_format
=
message_text_format
,
event_keyword_argument_dict
=
event_keyword_argument_dict
)
if
not
batch
:
return
redirect
(
REQUEST
,
site_url
,
translateString
(
"An email has been sent to you."
))
...
...
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