[Zope] Sending an alarm message to all logged-in users
Dennis Allison
allison at sumeru.stanford.EDU
Mon Oct 18 00:19:32 EDT 2004
We have a fairly complex multi-frame presentation. As I indicated,
I could do it by doing a test, but that's costly in our particular
situation. I'm looking for something a bit lower overhead.
On Sun, 17 Oct 2004, Jens Vagelpohl wrote:
> On Oct 17, 2004, at 18:14, Tino Wildenhain wrote:
>
> > Hi,
> >
> > Am So, den 17.10.2004 schrieb Dennis Allison um 17:52:
> >> Occasionally I have wished for a mechanism that would allow me to
> >> write
> >> all logged-in users. Of course, this could be acomplished with an
> >> explicit test, but making the test costs a lot of overhead. Is
> >> there a
> >> better way?
> >
> > HTTP is stateless. There is no such thing like "logged in".
> > Calls are only send from client to server, never the
> > other way round. Thus, you cannot "send" something to all
> > users.
>
> One way to fake this out (as Tino already says, the concept of "logged
> in user" is kind of meaningless) would be to have a slot in your main
> template that would display something if...
>
> - the current visitor has sent valid login information for the request
> (meaning the user for the duration of the request is not "Anonymous
> User")
>
> - you fill some variable, maybe a property at the site root, or change
> a script that returns something, with your message.
>
> Those things can be tested for easily.
>
> jens
>
> _______________________________________________
> Zope maillist - Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
More information about the Zope
mailing list