[Zope-CMF] PortalFolder.contentValues filters by creatability?
Tres Seaver
tseaver@palladion.com
Mon, 11 Jun 2001 20:54:44 -0400
Jens Quade wrote:
> 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]
It's a bug (it was affecting the new topic objects I created in
the '/download' folder on the dogbowl, for instance; I applied your
patch there just now).
Thanks for reporting it, and for the patch!
Tres.