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
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
Levin Zimmermann
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
Hide 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,
...
@@ -25,4 +25,5 @@ portal.portal_password.mailPasswordResetRequest(user_login=reference,
REQUEST
=
context
.
REQUEST
,
REQUEST
=
context
.
REQUEST
,
notification_message
=
notification_message
,
notification_message
=
notification_message
,
store_as_event
=
portal
.
portal_preferences
.
isPreferredStoreEvents
(),
store_as_event
=
portal
.
portal_preferences
.
isPreferredStoreEvents
(),
batch
=
True
,
**
kw
)
**
kw
)
product/ERP5/Tool/PasswordTool.py
View file @
6e304079
...
@@ -114,7 +114,8 @@ class PasswordTool(BaseTool):
...
@@ -114,7 +114,8 @@ class PasswordTool(BaseTool):
notification_message
=
None
,
sender
=
None
,
notification_message
=
None
,
sender
=
None
,
store_as_event
=
False
,
store_as_event
=
False
,
expiration_date
=
None
,
expiration_date
=
None
,
substitution_method_parameter_dict
=
None
):
substitution_method_parameter_dict
=
None
,
batch
=
False
):
"""
"""
Create a random string and expiration date for request
Create a random string and expiration date for request
Parameters:
Parameters:
...
@@ -162,7 +163,10 @@ class PasswordTool(BaseTool):
...
@@ -162,7 +163,10 @@ class PasswordTool(BaseTool):
"User ${user} does not have an email address, please contact site "
"User ${user} does not have an email address, please contact site "
"administrator directly"
,
mapping
=
{
'user'
:
user_login
})
"administrator directly"
,
mapping
=
{
'user'
:
user_login
})
if
msg
:
if
msg
:
return
redirect
(
REQUEST
,
site_url
,
msg
)
if
batch
:
raise
RuntimeError
(
msg
)
else
:
return
redirect
(
REQUEST
,
site_url
,
msg
)
key
=
self
.
getResetPasswordKey
(
user_login
=
user_login
,
key
=
self
.
getResetPasswordKey
(
user_login
=
user_login
,
expiration_date
=
expiration_date
)
expiration_date
=
expiration_date
)
...
@@ -209,8 +213,9 @@ class PasswordTool(BaseTool):
...
@@ -209,8 +213,9 @@ class PasswordTool(BaseTool):
store_as_event
=
store_as_event
,
store_as_event
=
store_as_event
,
message_text_format
=
message_text_format
,
message_text_format
=
message_text_format
,
event_keyword_argument_dict
=
event_keyword_argument_dict
)
event_keyword_argument_dict
=
event_keyword_argument_dict
)
return
redirect
(
REQUEST
,
site_url
,
if
not
batch
:
translateString
(
"An email has been sent to you."
))
return
redirect
(
REQUEST
,
site_url
,
translateString
(
"An email has been sent to you."
))
def
_generateUUID
(
self
,
args
=
""
):
def
_generateUUID
(
self
,
args
=
""
):
"""
"""
...
...
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