[Erp5-report] r39076 rafael - in /erp5/trunk/bt5/erp5_upgrader: SkinTemplateItem/portal_ski...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 12 22:23:25 CEST 2010


Author: rafael
Date: Tue Oct 12 22:23:25 2010
New Revision: 39076

URL: http://svn.erp5.org?rev=39076&view=rev
Log:
Allow flexibility. Call before script before sense.

Modified:
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/Alarm_senseUpgradeNeed.xml
    erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml
    erp5/trunk/bt5/erp5_upgrader/bt/revision

Modified: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/Alarm_senseUpgradeNeed.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/Alarm_senseUpgradeNeed.xml?rev=39076&r1=39075&r2=39076&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/Alarm_senseUpgradeNeed.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/Alarm_senseUpgradeNeed.xml [utf8] Tue Oct 12 22:23:25 2010
@@ -2,10 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <tuple>
-        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-        <tuple/>
-      </tuple>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -65,6 +62,11 @@ It will start an instance upgrade if any
 "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
 """\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
 \n
 portal_alarms = context.getPortalObject().portal_alarms\n
@@ -178,11 +180,13 @@ return\n
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
-                            <string>_getattr_</string>
+                            <string>getattr</string>
                             <string>context</string>
+                            <string>None</string>
+                            <string>before_script</string>
+                            <string>_getattr_</string>
                             <string>portal_alarms</string>
                             <string>activate</string>
-                            <string>None</string>
                             <string>previous_tag</string>
                             <string>active_process</string>
                             <string>DateTime</string>
@@ -190,7 +194,6 @@ return\n
                             <string>previous_method_id</string>
                             <string>_getiter_</string>
                             <string>alarm_id</string>
-                            <string>getattr</string>
                             <string>upgrader_alarm</string>
                             <string>False</string>
                           </tuple>

Modified: erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml?rev=39076&r1=39075&r2=39076&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml [utf8] Tue Oct 12 22:23:25 2010
@@ -73,8 +73,6 @@ for pt in portal_type_list:\n
   portal_type_document = getattr(context.portal_types, pt, None )\n
   if portal_type_document is not None:\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
 message_list.append(\n
             "Update Local Roles for security groups for: \\n\\t%s" % \\\n

Modified: erp5/trunk/bt5/erp5_upgrader/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_upgrader/bt/revision?rev=39076&r1=39075&r2=39076&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_upgrader/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_upgrader/bt/revision [utf8] Tue Oct 12 22:23:25 2010
@@ -1 +1 @@
-536
\ No newline at end of file
+537
\ No newline at end of file




More information about the Erp5-report mailing list