[CMF-checkins] CVS: Products/CMFCore - TypesTool.py:1.87
Yvo Schubbe
y.2005- at wcm-solutions.de
Wed Apr 13 03:58:27 EDT 2005
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv21651/CMFCore
Modified Files:
TypesTool.py
Log Message:
removed _checkViewType cruft (http://www.zope.org/Collectors/CMF/114)
=== Products/CMFCore/TypesTool.py 1.86 => 1.87 ===
--- Products/CMFCore/TypesTool.py:1.86 Fri Mar 25 07:54:50 2005
+++ Products/CMFCore/TypesTool.py Wed Apr 13 03:58:27 2005
@@ -52,7 +52,7 @@
_marker = [] # Create a new marker.
-class TypeInformation (SimpleItemWithProperties, ActionProviderBase):
+class TypeInformation(SimpleItemWithProperties, ActionProviderBase):
"""
Base class for information about a content type.
"""
@@ -432,7 +432,7 @@
InitializeClass( TypeInformation )
-class FactoryTypeInformation (TypeInformation):
+class FactoryTypeInformation(TypeInformation):
"""
Portal content factory.
"""
@@ -731,7 +731,7 @@
ti_prod, ti_mt = [x.strip() for x in typeinfo_name.split(':')]
for name, ft in info:
- if ( name.startswith(ti_prod) and
+ if ( name.startswith(ti_prod) and
name.endswith('(%s)' % ti_mt) ):
fti = ft
break
@@ -802,13 +802,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 ):
"""
@@ -827,8 +820,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
@@ -877,10 +868,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