[CMF-checkins] CVS: Products/CMFCore - PortalContent.py:1.33
Tres Seaver
tseaver@zope.com
Mon, 10 Dec 2001 15:55:11 -0500
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv1217/CMFCore
Modified Files:
PortalContent.py
Log Message:
- Clean up imports (stylistic).
- Remove import dependency on ResourceLockedError (for Z2.3 compatibility).
=== Products/CMFCore/PortalContent.py 1.32 => 1.33 ===
from DateTime import DateTime
from Globals import InitializeClass
+from Acquisition import aq_base
from OFS.SimpleItem import SimpleItem
from AccessControl import ClassSecurityInfo
-from CMFCorePermissions import AccessContentsInformation, View, \
- ReviewPortalContent, ModifyPortalContent
-import CMFCorePermissions
+
+from CMFCorePermissions import AccessContentsInformation, View, FTPAccess
+from CMFCorePermissions import ReviewPortalContent, ModifyPortalContent
+
from interfaces.Contentish import Contentish
from DynamicType import DynamicType
from utils import getToolByName, _checkPermission, _getViewFor
-from webdav.Lockable import ResourceLockedError
+
+try:
+ from webdav.Lockable import ResourceLockedError
+except ImportError:
+ class ResourceLockedError( Exception ):
+ pass
+
try:
from webdav.WriteLockInterface import WriteLockInterface
NoWL = 0
-except ImportError: NoWL = 1
-from Acquisition import aq_base
+except ImportError:
+ NoWL = 1
class PortalContent(DynamicType, SimpleItem):
@@ -67,11 +75,11 @@
security = ClassSecurityInfo()
- security.declareObjectProtected(CMFCorePermissions.View)
+ security.declareObjectProtected(View)
# The security for FTP methods aren't set up by default in our
# superclasses... :(
- security.declareProtected(CMFCorePermissions.FTPAccess,
+ security.declareProtected(FTPAccess,
'manage_FTPstat',
'manage_FTPget',
'manage_FTPlist',)
@@ -160,7 +168,7 @@
index_html = None # This special value informs ZPublisher to use __call__
- security.declareProtected(CMFCorePermissions.View, 'view')
+ security.declareProtected(View, 'view')
def view(self):
'''
Returns the default view even if index_html is overridden.