Re: [Zope] LoginManager broken?
"Phil Harris" <phil.harris@zope.co.uk> writes:
Phil,
Something that bit me when using the howto you referenced.
When creating the methods, as soon as the authenticate method is created the LoginManager starts using it, but since the other methods don't yet exist it starts generating errors with the result that you are locked out of the LoginManager and any folders secured by it.
Yeah, that bit me too. I think that the alternate approach in my writeup below avoids it by not telling the UserSource anything until everything else is set up. The main problem with it is that it doesn't currently take advantage of the cacheing features in BasicUserSource. I think that I need a trivial Python subclass of LoginUser that supports cache management, but I need to understand the lifetimes of virtual ZClasses in Racks a bit better first...
My solution was to create all the methods needed but with bogus names, such as by sticking an x as the first character of each.
This way you can test each in isolation and when satisfied that they are correct, rename them all in one fell swoop.
Cute. I'll remember this trick.
Ipso facto, presto magico you have a working LoginManager.
I've tried this procedure on 2.2.x with various versions of LoginManager/ZPatterns and it's worked every time. The latest Zope I've used it with is 2.2.4.
hth
Phil phil.harris@zope.co.uk
----- Original Message ----- From: "Mayers, Philip J" <p.mayers@ic.ac.uk> To: <zope@zope.org> Sent: Monday, December 11, 2000 8:34 PM Subject: RE: [Zope] LoginManager broken?
Thanks, I'll take a look.
Re: LoginManager - After a fast turnaround (confirming my ample faith in Open Source software) Magnus Heino pointed me in the right direction - the dtml methods and SQL objects need to be inside the UserSource folder, *not* the LoginManager folder as the Howto implies (or maybe I just can't read...). Can someone confirm that the SQL methods need to be inside the UserSource folder? (which is mildly annoying, but there we go...)
I'm still having some problems getting multiple roles working, but it's behaving itself for now. Now all I have to do is solve my LIMIT problem...
Regards, Phil
+----------------------------------+ | Phil Mayers, Network Support | | Centre for Computing Services | | Imperial College | +----------------------------------+
-----Original Message----- From: dan@sol.control.com [mailto:dan@sol.control.com] Sent: 11 December 2000 20:18 To: Mayers, Philip J Cc: 'zope@zope.org' Subject: Re: [Zope] LoginManager broken?
You might look at http://www.zope.org/Members/dlpierson/sqlLogin for a different approach that works for me in early testing. Note that it needs additional work before being turned loose on a live site.
participants (1)
-
dan@sol.control.com