Commit d7f7f484 authored by Rafael Monnerat's avatar Rafael Monnerat

Allow flexibility. Call before script before sense.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@39076 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ff434999
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -65,6 +62,11 @@ It will start an instance upgrade if any of the following alarms:\n ...@@ -65,6 +62,11 @@ It will start an instance upgrade if any of the following alarms:\n
"sense" a need of an upgrade. This alarm is likely to disappear soon as it\'s needed \n "sense" a need of an upgrade. This alarm is likely to disappear soon as it\'s needed \n
due to lack of functionality (which is that alarms can not automatically "solve" themselves).\n due to lack of functionality (which is that alarms can not automatically "solve" themselves).\n
"""\n """\n
# If before script is present call it.\n
before_script = getattr(context, \'ERP5Site_beforeSenseUpgrade\', None)\n
if before_script is not None:\n
before_script()\n
\n
context.ERP5Site_setupUpgraderSkinSelection()\n context.ERP5Site_setupUpgraderSkinSelection()\n
\n \n
portal_alarms = context.getPortalObject().portal_alarms\n portal_alarms = context.getPortalObject().portal_alarms\n
...@@ -178,11 +180,13 @@ return\n ...@@ -178,11 +180,13 @@ return\n
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>_getattr_</string> <string>getattr</string>
<string>context</string> <string>context</string>
<string>None</string>
<string>before_script</string>
<string>_getattr_</string>
<string>portal_alarms</string> <string>portal_alarms</string>
<string>activate</string> <string>activate</string>
<string>None</string>
<string>previous_tag</string> <string>previous_tag</string>
<string>active_process</string> <string>active_process</string>
<string>DateTime</string> <string>DateTime</string>
...@@ -190,7 +194,6 @@ return\n ...@@ -190,7 +194,6 @@ return\n
<string>previous_method_id</string> <string>previous_method_id</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>alarm_id</string> <string>alarm_id</string>
<string>getattr</string>
<string>upgrader_alarm</string> <string>upgrader_alarm</string>
<string>False</string> <string>False</string>
</tuple> </tuple>
......
...@@ -73,8 +73,6 @@ for pt in portal_type_list:\n ...@@ -73,8 +73,6 @@ for pt in portal_type_list:\n
portal_type_document = getattr(context.portal_types, pt, None )\n portal_type_document = getattr(context.portal_types, pt, None )\n
if portal_type_document is not None:\n if portal_type_document is not None:\n
portal_type_document.updateRoleMapping()\n portal_type_document.updateRoleMapping()\n
else:\n
message_list.append("Unable to upgrade security on %s portal type because it is not present on portal." % pt)\n
\n \n
message_list.append(\n message_list.append(\n
"Update Local Roles for security groups for: \\n\\t%s" % \\\n "Update Local Roles for security groups for: \\n\\t%s" % \\\n
......
536 537
\ 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