Commit cac8e823 authored by Georgios Dagkakis's avatar Georgios Dagkakis

FIXUP: erp5_base: Add 'deleted' state and transitions in reachability_workflow, and related

improve comment
In case of a document that has specific id used in content
accessors on parent, such as parent.getDefaultEmailValidationState(),
we cannot just delete the document, because it would break accessors
for security reasons.
To prevent this problem, we change the id on this document before
parent 46c025ba
...@@ -7,7 +7,11 @@ if (coordinate.getId(), coordinate.getPortalType()) in ( ...@@ -7,7 +7,11 @@ if (coordinate.getId(), coordinate.getPortalType()) in (
('default_email', 'Email'), ('default_email', 'Email'),
('alternate_email', 'Email'), ('alternate_email', 'Email'),
): ):
# In case we are in case of a document that has specific function, change the id # In case of a document that has specific id used in content
# accessors on parent, such as parent.getDefaultEmailValidationState(),
# we cannot just delete the document, because it would break accessors
# for security reasons.
# To prevent this problem, we change the id on this document before
coordinate.setId( coordinate.setId(
coordinate.getParentValue().generateNewId() coordinate.getParentValue().generateNewId()
) )
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment