Commit 2b8750b7 authored by Jérome Perrin's avatar Jérome Perrin

Add a Manager proxy role on DeliveryMovement_unlinkSimulation.

When deleting a delivery movement, related simulation movements are modified. This mean that the user deleting a delivery movement needs modify portal content permission on related simulation movements.
For now we added a Manager proxy role, but ideally this should be done from unrestricted code

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22565 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 70785efd
...@@ -65,7 +65,15 @@ ...@@ -65,7 +65,15 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>delivery_movement = state_change[\'object\']\n <value> <string>"""Unlink simulation movements when delivery movement is deleted.\n
This way when a delivery movement is deleted, corresponding simulation movement\n
will again be candidates for building in another delivery.\n
\n
XXX: security (future) bug: this requires that the system is configured in a way where \n
simulation movement can be accessed in restrictred mode. For now this script has a proxy\n
role, but someday we\'ll have to move this to unrestricted environment.\n
"""\n
delivery_movement = state_change[\'object\']\n
\n \n
# Clean simulation\n # Clean simulation\n
simulation_movement_list = delivery_movement.getDeliveryRelatedValueList(\n simulation_movement_list = delivery_movement.getDeliveryRelatedValueList(\n
...@@ -91,6 +99,14 @@ for simulation_movement in simulation_movement_list:\n ...@@ -91,6 +99,14 @@ for simulation_movement in simulation_movement_list:\n
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>state_change</string> </value> <value> <string>state_change</string> </value>
</item> </item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
<value> <value>
......
879 881
\ No newline at end of file \ No newline at end of file
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