[Zope] SimpleUserFolder and sha-crypted passwd

Chris Withers chrisw@nipltd.com
Wed, 08 Jan 2003 09:03:00 +0000


Bjørge Solli wrote:
> 
> I solved it. It seems to go wrong if I try to have addUser, deleteUser, 
> editUser and getUserNames as SQL methods and getUserDetails as a Python 
> Script, so after ripping my hair off I changed them all to python scripts. 
> And suddenly everything worked fine:-) I have no idea if this was due to 
> an error on my behaf or if it is a limitation in SUF(if it is, you should 
> try to get rid of it!).

I'm afraid it's likely to be an error on your part. There's no such limitation 
in SUF to my knowledge, but if you can demonstrate one I'd be happy to fix it.

> Just for the record; I did not change my encryption lines, and yes they 
> are in a python scripts(some external).

My question was relating to importing some of the stuff you're using from within 
Script (Python)'s. Things like sha are unlikely to have Zope security assertions 
and so would have failed with an UnauthorizedError when you tried to use them. 
If that happens as part of the user authorization process, you might experience 
it as your username/passwords from SUF 'not working'.

> You might think of caching the username and roles in some way, is it 
> really neccesary to query the db every single GET command?

True, I'd prefer not to throw mroe responsibility onto SUF. If this is an issue, 
I'd suggest looking into using Zope's standard cache managers on your 
getUserDetails method. If you do this and can work it into a How-To, that'd be 
very very cool :-)

cheers,

Chris