[CMF-checkins] CVS: Products/CMFCore - TypesTool.py:1.74.2.5

Yvo Schubbe y.2004_ at wcm-solutions.de
Thu Oct 7 07:18:34 EDT 2004


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv1583/CMFCore

Modified Files:
      Tag: CMF-1_5-branch
	TypesTool.py 
Log Message:
- removed again the "add properties from the ZMI" feature
- synced HEAD and CMF-1_5-branch


=== Products/CMFCore/TypesTool.py 1.74.2.4 => 1.74.2.5 ===
--- Products/CMFCore/TypesTool.py:1.74.2.4	Sat Sep 25 16:30:28 2004
+++ Products/CMFCore/TypesTool.py	Thu Oct  7 07:18:34 2004
@@ -25,7 +25,6 @@
 from Globals import DTMLFile
 from Globals import InitializeClass
 from OFS.Folder import Folder
-from OFS.PropertyManager import PropertyManager
 from Products.PageTemplates.PageTemplateFile import PageTemplateFile
 from zLOG import LOG, ERROR
 import Products
@@ -71,11 +70,6 @@
     security.declareProtected(ManagePortal, 'manage_changeProperties')
     security.declareProtected(ManagePortal, 'manage_propertiesForm')
 
-    # Overload the schema freezing of SimpleItemWithProperties
-    security.declareProtected(ManagePortal, 'manage_addProperty')
-    security.declareProtected(ManagePortal, 'manage_delProperties')
-    manage_propertiesForm = PropertyManager.manage_propertiesForm
-
     _basic_properties = (
         {'id':'title', 'type': 'string', 'mode':'w',
          'label':'Title'},
@@ -518,6 +512,7 @@
         if not self.product or not self.factory or container is None:
             return default
 
+        # In case we aren't wrapped.
         dispatcher = getattr(container, 'manage_addProduct', None)
 
         if dispatcher is None:
@@ -529,7 +524,9 @@
             LOG('Types Tool', ERROR, '_queryFactoryMethod raised an exception',
                 error=exc_info())
             return default
+
         m = getattr(p, self.factory, None)
+
         if m:
             try:
                 # validate() can either raise Unauthorized or return 0 to
@@ -538,6 +535,7 @@
                     return m
             except zExceptions_Unauthorized:  # Catch *all* Unauths!
                 pass
+
         return default
 
     security.declarePublic('isConstructionAllowed')
@@ -886,7 +884,6 @@
         result = typenames.keys()
         result.sort()
         return result
-
 
     security.declarePublic('constructContent')
     def constructContent( self



More information about the CMF-checkins mailing list