[CMF-checkins] CVS: CMF/CMFCore - ActionsTool.py:1.21 DirectoryView.py:1.17 DiscussionTool.py:1.6 FSPropertiesObject.py:1.8 MemberDataTool.py:1.14 RegistrationTool.py:1.9 TypesTool.py:1.29
Andrew Sawyers
andrew@zope.com
Thu, 10 Jan 2002 11:26:53 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv5016/CMFCore
Modified Files:
ActionsTool.py DirectoryView.py DiscussionTool.py
FSPropertiesObject.py MemberDataTool.py RegistrationTool.py
TypesTool.py
Log Message:
*Merging bugfixes from 1_2-branch into head.
=== CMF/CMFCore/ActionsTool.py 1.20 => 1.21 ===
$Id$
-"""
__version__='$Revision$'[11:-2]
=== CMF/CMFCore/DirectoryView.py 1.16 => 1.17 ===
security.declareProtected(ManagePortal,
'manage_properties')
- def manage_properties( self, dirpath, REQUEST ):
+ def manage_properties( self, dirpath, REQUEST=None ):
"""
Update the directory path of the DV.
"""
self.__dict__['_real']._dirpath = dirpath
- REQUEST['RESPONSE'].redirect( '%s/manage_propertiesForm'
- % self.absolute_url() )
+ if REQUEST is not None:
+ REQUEST['RESPONSE'].redirect( '%s/manage_propertiesForm'
+ % self.absolute_url() )
security.declareProtected(AccessContentsInformation,
'getCustomizableObject')
=== CMF/CMFCore/DiscussionTool.py 1.5 => 1.6 ===
content = info.content
if content is None or not self.isDiscussionAllowedFor(content):
- return None
+ return []
discussion = self.getDiscussionFor(content)
if discussion.aq_base == content.aq_base:
=== CMF/CMFCore/FSPropertiesObject.py 1.7 => 1.8 ===
})
except:
- import pdb; pdb.set_trace()
raise ValueError, ( 'Error processing line %s of %s:\n%s'
% (lino,fp,line) )
self._properties = tuple(map)
=== CMF/CMFCore/MemberDataTool.py 1.13 => 1.14 ===
__version__='$Revision$'[11:-2]
-
import string
from utils import UniqueObject, getToolByName, _dtmldir
from OFS.SimpleItem import SimpleItem
=== CMF/CMFCore/RegistrationTool.py 1.8 => 1.9 ===
# 'portal_registration' interface methods
#
+ security.declarePrivate('listActions')
+ def listActions(self, info):
+ return None
security.declarePublic('isRegistrationAllowed')
def isRegistrationAllowed(self, REQUEST):
=== CMF/CMFCore/TypesTool.py 1.28 => 1.29 ===
from utils import _dtmldir, _checkPermission, cookString
import urllib
+from utils import _dtmldir, _checkPermission, cookString, getToolByName
import string
from AccessControl import getSecurityManager, ClassSecurityInfo
+try:
+ from AccessControl import Unauthorized
+except:
+ Unauthorized = 'Unauthorized'
from Acquisition import aq_base
import Products, CMFCorePermissions
from ActionProviderBase import ActionProviderBase
@@ -432,7 +437,7 @@
m = self._getFactoryMethod(container, raise_exc=1)
if m is None:
- raise 'Unauthorized', ('Cannot create %s' % self.getId())
+ raise Unauthorized, ('Cannot create %s' % self.getId())
id = str(id)
@@ -447,7 +452,9 @@
if hasattr(ob, '_setPortalTypeName'):
ob._setPortalTypeName(self.getId())
-
+ wf = getToolByName(ob, 'portal_workflow', None)
+ if wf is not None:
+ wf.notifyCreated(ob)
return ob
InitializeClass( FactoryTypeInformation )
@@ -492,7 +499,7 @@
of its "immediate" view (typically the metadata form).
"""
if not self.isConstructionAllowed(container):
- raise 'Unauthorized'
+ raise Unauthorized
constructor = self.restrictedTraverse( self.constructor_path )
# Rewrap to get into container's context.