joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-20 22:19 UTC
Different sessions for different users
Hi, In my application, normal users are signed in until they manually log out. We also have admin users, who are also logged in until the manually log out. I do this by setting the session expiration date to 2038 or something far in the future. How can I change the session expiration date only for the admin users? I want the admin users to be logged out whenever they close their browser. Thanks, Joe --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
When the user logs in, just check if they''re an admin and set the session accordingly. :) RSL On 1/20/07, joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Hi, > > In my application, normal users are signed in until they manually log > out. We also have admin users, who are also logged in until the > manually log out. > > I do this by setting the session expiration date to 2038 or something > far in the future. > > How can I change the session expiration date only for the admin users? > I want the admin users to be logged out whenever they close their > browser. > > Thanks, > Joe > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Jan-24 22:09 UTC
Re: Different sessions for different users
How would you do that? On Jan 21, 7:14 am, "Russell Norris" <sco...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> When the user logs in, just check if they''re an admin and set the session > accordingly. :) > > RSL > > On 1/20/07, joevan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <joevan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, > > > In my application, normal users are signed in until they manually log > > out. We also have admin users, who are also logged in until the > > manually log out. > > > I do this by setting the session expiration date to 2038 or something > > far in the future. > > > How can I change the session expiration date only for the admin users? > > I want the admin users to be logged out whenever they close their > > browser. > > > Thanks, > > Joe--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
if admin + expired then kill session + go login end 2007/1/24, joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <joevandyk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > > How would you do that? > > On Jan 21, 7:14 am, "Russell Norris" <sco...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > When the user logs in, just check if they''re an admin and set the > session > > accordingly. :) > > > > RSL > > > > On 1/20/07, joevan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <joevan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > Hi, > > > > > In my application, normal users are signed in until they manually log > > > out. We also have admin users, who are also logged in until the > > > manually log out. > > > > > I do this by setting the session expiration date to 2038 or something > > > far in the future. > > > > > How can I change the session expiration date only for the admin users? > > > I want the admin users to be logged out whenever they close their > > > browser. > > > > > Thanks, > > > Joe > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---