Modifying a session variable from a different process?


I’ve implemented a log in session “thing” that essentially works by
holding the model of the logged in user in a session variable, like

session[:user] = user

However let’s say at this point in time, should an administrator of the
system decide to revoke this user’s account, the session variable for
that currently logged in user is still valid, and hence he will still be
able to access the system!

Is it possible to modify a session variable even if it doesn’t belong to
the currently running process? The only other alternative for such a
problem would be to poll the user database table each time to check if
that user is still valid, which doesn’t sound all that great.

Store the ID that fetch the model each request.

– Tom M.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs