[Zope] User is logged in? (LoginManager)
Ty Sarna
tsarna@endicor.com
10 May 2000 17:54:11 GMT
In article <Pine.LNX.3.96.1000507165720.29157A-100000@staff.norman.k12.ok.us>,
Jon Delheimer <jon@norman.k12.ok.us> wrote:
>
> How do you determine if the user is logged in?
>
> You can not check for "Anonymous User" because the user can briefly be
> "LoggingInUser". You can not check for the Anonymous role because
This should only be the case while running LoginManager/GUS's
DTML/PythonMethod/whatever methods.
> LoginManager forces everybody to have the Anonymous role.
Yes. Generic User Source inhereted this from GenericUserFolder, and I
could have sworn that was the Zope norm, but it seems not to be the
case. The standard Zope user folder does not give anyone Anonymous, in
the quick test I did. Our other in-house User Souce did not force
Anonymous, and it works fine also.
I've removed the forced Anonymous role from LoginManager's Generic User
Source, and it should be that way in the next release, whenever that
happens.
> I think if LoginManager gave LoggingInUser the Anonymous role and stopped
> forcing everybody else to have the Anonymous role, I could use the
> Anonymous role for the test.
>
> Is there another way to determine if the user is logged in?
Perhaps you could explain in more detail what you're trying to accomplish?