Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
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.
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.
"""
context
.
setUserId
(
None
)
context
.
manage_delObjects
(
ids
=
[
document
.
getId
()
for
document
in
context
.
objectValues
(
portal_type
=
context
.
getPortalObject
().
getPortalLoginTypeList
()
)
])
context
.
Person_initUserId
()
if
not
context
.
REQUEST
.
get
(
'is_business_template_installation'
,
0
):
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