Per-User basis security with restful_authentication in Rails ?
- by benoror
Hi! I'm using restful_authentication plugin, but I would like to have per-user security, for example:
class PostsController < ApplicationController
# Login required
before_filter :login_required, :except => [ :index, :show ]
# Only the same user can create, edit and delete their own posts
before_filter :only_by_same_user, :only => [ :create, :update, :destroy ]
end
Thanks!