Reputation: 171321
I thought to store the type of the currently logged in user in session[:user_type]
. The options are: "admin", "end_user", "demo" (may add more user types in the future).
I wonder if it is safe to do that in Rails 3 application.
Can user change somehow the session[:user_type]
from "demo" to "admin" ?
Upvotes: 8
Views: 5601
Reputation: 5193
It depends of your session store.
By default use cookies as a session store so by default it's not safe it's pretty easy to change the content of a cookie.
So you could either :
Upvotes: 4