[Zope-CMF] PortalFolder.contentValues filters by creatability?

Jens Quade jq@jquade.de
11 Jun 2001 16:52:28 +0200


Hi,

it seems that PortalFolder.contentValues (the heart of 
folder_contents) filters not only by existing types, 
but also by authorization to create content types. 

For example, if Members are not allowed to create Portal Folders
in the root of a portal, they cannot see any folders there,
even if they may have rights to create contents _in_ these folders.

This this behavior intended or is it a bug? If it's a bug,
I'll post the patch (see below) to the tracker.

regards,
jens


Index: PortalFolder.py
===================================================================
RCS file: /cvs-repository/CMF/CMFCore/PortalFolder.py,v
retrieving revision 1.17
diff -c -r1.17 PortalFolder.py
*** PortalFolder.py	2001/06/08 15:07:21	1.17
--- PortalFolder.py	2001/06/11 14:39:32
***************
*** 195,201 ****
          '''
          new_spec = []
          types_tool = getToolByName(self, 'portal_types')
!         types = types_tool.listContentTypes( container=self, by_metatype=1 )
          if spec is not None:
              if type(spec) == type(''):
                  spec = [spec]
--- 195,201 ----
          '''
          new_spec = []
          types_tool = getToolByName(self, 'portal_types')
!         types = types_tool.listContentTypes( by_metatype=1 )
          if spec is not None:
              if type(spec) == type(''):
                  spec = [spec]