[Zope-CMF] contentValues vs. objectValues, members vs. users?

Tres Seaver Tres Seaver <tseaver@digicool.com>
Thu, 07 Jun 2001 18:33:56 -0400


Anders Schneiderman wrote:

> What's the difference between contentValues and objectValues?  I've 
> created a customized version of  folder_contents in my new skin, and 
> it's doing something odd.  When I first ran it, it didn't show the 
> folders that were in organizing/healthcare, even though they showed up 
> in /manage.  I added some folders & content via folder_contents, and it 
> showed up, but not the folders that had been created by /manage.
> 
> I looked at the code and found that folder_contents called 
> contentValues, for which I couldn't find documentation.  Just for the 
> hell of it, I switched it to objectValues:
> ---------------------------
> <dtml-in expr="objectValues()"
>          sort="id" size="19" start=qs>
> ------------------------------
> 
> Now everything shows up.  So, what's the difference between 
> contentValues and objectValues?


Not all objects in a folder are "content" (consider the "tool" objects
in the site root, for instance).  The CMF tries hard not to expose the
"plumbing" bits to folks who couldn't be less interested;  those who do
care can use the ZMI.  So, 'contentValues' filters 'objectValues', returning
only those objects which "smell" like content.

Your particular problem arises from the fact that content created via
the ZMI doesn't get the magic 'portal_type' attribute set;  in the 1.1beta
(but not the latest CVS), this means it can't find its "type information
object", and so doesn't "smell" like content to the 'contentValues'
method.


> I'm wondering whether my confusion is really over the difference between 
> members and users.  I know members have abilities that users don't, such 
> as the ability to choose which skin they want.  But what's the 
> relationship betwixt the two?  To create a member, do you first create a 
> user?  And where do I find documentation on this?  I couldn't sort it 
> out from Beehive's otherwise quite helpful documentation.


"Member" is about preferences, having a member folder, etc.; "user" is about
authentication (who you are) and authorization (what you are allowed to do).
The CMF is willing to get its "users" from anywhere;  it wraps each one
(potentially) in a "member" parka, which has the "pockets" it needs for
storing information specific to the CMFSite.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org