[Erp5-report] r19255 - in /erp5/trunk/products/ERP5Type: ./ patches/

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Feb 11 19:00:10 CET 2008


Author: vincent
Date: Mon Feb 11 19:00:09 2008
New Revision: 19255

URL: http://svn.erp5.org?rev=19255&view=rev
Log:
Remove the monkey patch while retaining the functionality (as we subclass it). Thanks Jerome.

Removed:
    erp5/trunk/products/ERP5Type/patches/CMFCoreTypesTool.py
Modified:
    erp5/trunk/products/ERP5Type/ERP5Type.py
    erp5/trunk/products/ERP5Type/ZopePatch.py

Modified: erp5/trunk/products/ERP5Type/ERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ERP5Type.py?rev=19255&r1=19254&r2=19255&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ERP5Type.py (original)
+++ erp5/trunk/products/ERP5Type/ERP5Type.py Mon Feb 11 19:00:09 2008
@@ -146,6 +146,9 @@
     immediate_view = 'view'
     hidden_content_type_list = ()
     permission = ''
+
+    security.declareProtected(Permissions.ManagePortal, 'manage_main')
+    manage_main = FactoryTypeInformation.manage_propertiesForm
 
     # Groups are used to classify portal types (e.g. resource).
     # IMPLEMENTATION NOTE

Modified: erp5/trunk/products/ERP5Type/ZopePatch.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ZopePatch.py?rev=19255&r1=19254&r2=19255&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ZopePatch.py (original)
+++ erp5/trunk/products/ERP5Type/ZopePatch.py Mon Feb 11 19:00:09 2008
@@ -56,7 +56,6 @@
 from Products.ERP5Type.patches import PythonScript
 from Products.ERP5Type.patches import MailTemplates
 from Products.ERP5Type.patches import persistent_patch
-from Products.ERP5Type.patches import CMFCoreTypesTool
 
 # for python2.3 compatibility
 import threading

Removed: erp5/trunk/products/ERP5Type/patches/CMFCoreTypesTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/CMFCoreTypesTool.py?rev=19254&view=auto
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/CMFCoreTypesTool.py (original)
+++ erp5/trunk/products/ERP5Type/patches/CMFCoreTypesTool.py (removed)
@@ -1,12 +1,0 @@
-from Products.CMFCore.TypesTool import TypeInformation
-from zLOG import LOG, INFO
-
-if getattr(TypeInformation, 'manage_main', None) is not None:
-  LOG('ERP5Type/patches/CMFCoreTypesTool.py', INFO, 'This patch is no longer needed. Skipping.')
-elif None in (getattr(TypeInformation, 'manage_propertiesForm__roles__', None),
-              getattr(TypeInformation, 'manage_propertiesForm', None)):
-  LOG('ERP5Type/patches/CMFCoreTypesTool.py', INFO, 'manage_propertiesForm not found. Skipping.')
-else:
-  TypeInformation.manage_main__roles__ = TypeInformation.manage_propertiesForm__roles__
-  TypeInformation.manage_main = TypeInformation.manage_propertiesForm
- 




More information about the Erp5-report mailing list