[Zope] Question About Additional info for AUTHENTICATED_USER

Michel Pelletier michel@digicool.com
Tue, 7 Dec 1999 10:33:48 -0500


> -----Original Message-----
> From: scott kaplan [mailto:skaplan@wso.williams.edu]
> Sent: Monday, December 06, 1999 6:19 PM
> To: zope@zope.org
> Subject: [Zope] Question About Additional info for AUTHENTICATED_USER
> 
> 
> Hi All,
> I have a question about adding additional information to a user object
> (or another way to do this)  I want to have an attribute for 
> each user.
> i.e. each user will have a subject attribute, so when they view a
> certain page, only messages of that subject appear
> 
> Since this is only one bit of info, I don't want to make a separate
> permission for each subject, because that would be very un-extensible
 
We are still working on Membership, but when we're done with it it's
going to be cool.  Membership gives a sort of higher order value to the
user object.  What you want to do here is one of our use cases for
membership.

For now it might be handy to check out one of the various sessions
products available, perhaps you can hook the creation/desctruction of a
session to make a DB query to get all of your additional user info.
 
> So what's the best way to do this:
> 
> 1)Do i try to hack info into the authenticated user object (A 
> follow-up
> question is how do i go about doing this, where is that 
> object defined?)

(h)Ack!
 
> 2) Do i associate each user with a database entry with the 
> additional info
> (This seems like a bit of overkill for my purposes)

but pretty useful and scalable, and you can use that data in other apps
if you put it in a relational db.
 
> 3)Do i add the information into the product I am working with 
> (while this
> would work, i am not how to insure the information between then user
> folder and my product are the same)

This would work, but it would be hard to maintain.

-Michel