[Zope] how to check a user role with data entred by user?

Andrew Milton akm at theinternet.com.au
Thu Mar 5 04:12:19 EST 2009


+-------[ Dvir Bar-lev ]----------------------
| First tx for the reply Andrew.
| How do I check that the password that was entered is the correct one for
| that role than?
| As it is presented in the reply the password of the role and the one
| that the user entered aren't any consideration at all

Right you didn't ask about logging them in :-)
You asked about checking the role :-)

You can't directly access the password in the user object from a python
script because it's protected (by virtue of being named '__', and the
getPassword method is named '_getPassword')

Logging them in from a form, without using a user folder product that
caters to that, or a PAS plugin, or using the Cookie Crumbler product,
is a little difficult to do and is probably not worth the effort given
the number of people who have already solved this problem for you.

Since you're new, I would look into PAS (Pluggable Auth Source) plugins
since it seems you want to do your own authentication.

-- 
Andrew Milton
akm at theinternet.com.au


More information about the Zope mailing list