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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
b7735923
Commit
b7735923
authored
Jul 05, 2018
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: do not clone logins when cloning persons
parent
0829bca2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_afterClone.py
...nTemplateItem/portal_skins/erp5_base/Person_afterClone.py
+8
-1
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/Person_afterClone.py
View file @
b7735923
"""Hook called when a person object is closed.
"""Hook called when a person object is closed.
We want to reset reference, which is the user login in ERP5Security.
We want to reset reference, which is the user login in the old ERP5Security.
We don't want neither to clone the Logins of the user.
One exception is when a person object is installed from business template.
One exception is when a person object is installed from business template.
"""
"""
context
.
setUserId
(
None
)
context
.
setUserId
(
None
)
context
.
manage_delObjects
(
ids
=
[
document
.
getId
()
for
document
in
context
.
objectValues
(
portal_type
=
context
.
getPortalObject
().
getPortalLoginTypeList
()
)
])
context
.
Person_initUserId
()
context
.
Person_initUserId
()
if
not
context
.
REQUEST
.
get
(
'is_business_template_installation'
,
0
):
if
not
context
.
REQUEST
.
get
(
'is_business_template_installation'
,
0
):
context
.
setReference
(
None
)
context
.
setReference
(
None
)
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