[Rails] Re: invalidating a session on multiple login

Peter Ertl
Fri, 23 Jun 2006 09:51:31 -0000

I would reconsider the gui design of your application as this kind of
login / logout - scenario is weird...

if you have different roles in your applications you should use a user
<=> roles mapping
and extend the session credentials.

Martin DeMello schrieb:
> Okay, this is even harder than I thought. Consider the following use
> case: user1 logs in. He opens a new tab and tries to log in again.
> Either by making him click logout or transparently, I reset the
> session, and log him in as user2. The previous tab will still be
> changed to user2, since the session reset can''t affect the client
side
> - I''m beginning to think the only thing to do is store the logged
in
> user in javascript and do a timed ajax call to see if it matches the
> session user and invalidate the page on the client side if not. Anyone
> have a better idea?
>
> martin
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails