[Zope] Prompting for login, logging out?

Art Hampton arth@pacsg.css.mot.com
Thu, 02 Dec 1999 14:33:05 -0600


For the moment, I'm using the standard acl_users folders that are built
into Zope.

I've got a page that generates information of interest to a given user. 
The Anonymous User is allowed to view the page.  However, to view a
customized version, the user must first log in.

How do I force Zope to prompt the user for a login (preferably when they
push a button)?

The only thing I've come up with is creating an "Authenticated" role,
assigning all users to that role, and then creating a "Login" document
which the Anonymous role cannot view, but the Authenticated role can.

Although it works, it seems like there should be a better (built into
Zope) way.  Is there?  The disadvantage to my Authenticated role scheme
is that we need to make sure that every user is assigned this role.

Also, I'm still interested in that snippet of code that logs out the
current user (I think it removes a cookie?  I'm not sure).  If someone
could post that, I'd be grateful.

Thanks in advance.