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

Yvo Schubbe y.2005- at wcm-solutions.de
Wed Apr 13 03:57:53 EDT 2005


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

Modified Files:
      Tag: CMF-1_5-branch
	TypesTool.py 
Log Message:
removed _checkViewType cruft (http://www.zope.org/Collectors/CMF/114)


=== Products/CMFCore/TypesTool.py 1.74.2.10 => 1.74.2.11 ===
--- Products/CMFCore/TypesTool.py:1.74.2.10	Fri Mar 25 07:53:50 2005
+++ Products/CMFCore/TypesTool.py	Wed Apr 13 03:57:52 2005
@@ -50,7 +50,7 @@
 _marker = []  # Create a new marker.
 
 
-class TypeInformation (SimpleItemWithProperties, ActionProviderBase):
+class TypeInformation(SimpleItemWithProperties, ActionProviderBase):
     """
     Base class for information about a content type.
     """
@@ -469,7 +469,7 @@
 InitializeClass( TypeInformation )
 
 
-class FactoryTypeInformation (TypeInformation):
+class FactoryTypeInformation(TypeInformation):
     """
     Portal content factory.
     """
@@ -858,13 +858,6 @@
         else:
             return None
 
-    security.declarePrivate('_checkViewType')
-    def _checkViewType(self,t):
-        try:
-            return getSecurityManager().validate(t, t, 'Title', t.Title)
-        except zExceptions_Unauthorized:  # Catch *all* Unauths!
-            return 0
-
     security.declareProtected(AccessContentsInformation, 'listTypeInfo')
     def listTypeInfo( self, container=None ):
         """
@@ -883,8 +876,6 @@
                 # Not ready.
                 continue
             # check we're allowed to access the type object
-            if not self._checkViewType(t):
-                continue
             if container is not None:
                 if not t.isConstructionAllowed(container):
                     continue
@@ -933,10 +924,6 @@
         info = self.getTypeInfo( type_name )
         if info is None:
             raise ValueError('No such content type: %s' % type_name)
-
-        # check we're allowed to access the type object
-        if not self._checkViewType(info):
-            raise AccessControl_Unauthorized(info)
 
         ob = info.constructInstance(container, id, *args, **kw)
 



More information about the CMF-checkins mailing list