Commit 3bbeb07c authored by Łukasz Nowak's avatar Łukasz Nowak

- revoke and remove certificate while destroying software instance

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42615 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9936258c
...@@ -50,7 +50,18 @@ ...@@ -50,7 +50,18 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>packing_list_line = context.SoftwareInstance_getInstanceDestroyPackingListLine(state_change)\n <value> <string># revoke certificate\n
context.getPortalObject().portal_certificate_authority\\\n
.revokeCertificate(context.getDestinationReference())\n
\n
# remove certificate from SI\n
context.edit(\n
ssl_key=None,\n
ssl_certificate=None,\n
)\n
\n
# deliver proper packing list\n
packing_list_line = context.SoftwareInstance_getInstanceDestroyPackingListLine(state_change)\n
packing_list = packing_list_line.getParentValue()\n packing_list = packing_list_line.getParentValue()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
packing_list.start()\n packing_list.start()\n
...@@ -101,6 +112,7 @@ if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_l ...@@ -101,6 +112,7 @@ if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_l
<string>state_change</string> <string>state_change</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>None</string>
<string>packing_list_line</string> <string>packing_list_line</string>
<string>packing_list</string> <string>packing_list</string>
</tuple> </tuple>
......
194 195
\ 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