Hi guys,
I need some help about logins and session and any help would be much
appreciated :)

This is the scenario:
* Django 1.2.0
* Firefox (but I think any browser too)

This the steps:
1) In the same computer (so in the same browser session) I have two
browser windows "W1" and "W2" where the user "U1" is already logged in
in both windows.
2) In the browser window "W1" the user logs out
3) In the browser window "W1" the user "U2" logins in and gets
redirect to the main web page
4) In the browser window "W2" any call to the views (all using the
"login_required" decorator) is done with request.user set to "U2"
instead the old "U1" --> here the human user could still think to be
"U1" in this window (indeed he can see "U1" printed in the web page
previously rendered), but he's surfing like "U2"

Since you can't keep to more logged users in the same session, I'd
like to catch this situation and redirect the user to the log in page.

Of course I don't want to rewrite all the ajax and not ajax calls to
pass the "current" (means "old") user as parameter to match with
request.user for a change. It's ugly and expensive.

Any idea?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to