[CMF-checkins] CVS: Products/CMFCore - PortalFolder.py:1.71.2.1
Yvo Schubbe
y.2004_ at wcm-solutions.de
Tue Aug 24 15:14:17 EDT 2004
Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv4333/CMFCore
Modified Files:
Tag: CMF-1_5-branch
PortalFolder.py
Log Message:
- added listDAVObjects
- refactored and added some PortalFolder tests
=== Products/CMFCore/PortalFolder.py 1.71 => 1.71.2.1 ===
--- Products/CMFCore/PortalFolder.py:1.71 Thu Aug 12 11:07:39 2004
+++ Products/CMFCore/PortalFolder.py Tue Aug 24 15:13:46 2004
@@ -30,16 +30,17 @@
from CMFCatalogAware import CMFCatalogAware
from DynamicType import DynamicType
from exceptions import AccessControl_Unauthorized
-from exceptions import zExceptions_Unauthorized
from exceptions import BadRequest
+from exceptions import zExceptions_Unauthorized
from permissions import AddPortalContent
from permissions import AddPortalFolders
from permissions import ChangeLocalRoles
+from permissions import DeleteObjects
from permissions import ListFolderContents
from permissions import ManagePortal
from permissions import ManageProperties
from permissions import View
-from permissions import DeleteObjects
+from utils import _checkPermission
from utils import getToolByName
@@ -289,6 +290,13 @@
spec = self._morphSpec(spec)
ids = self.objectIds(spec)
return self._filteredItems( ids, filter )
+
+ # protected by 'WebDAV access'
+ def listDAVObjects(self):
+ if _checkPermission(ManagePortal, self):
+ return self.objectValues()
+ else:
+ return self.listFolderContents()
security.declareProtected(View, 'Title')
def Title( self ):
More information about the CMF-checkins
mailing list