pass object to a before_filter

i would like to build a authetication system where i can pass a object (precisely the current id in the controller) to the before_filter. then i do some reflection fun to find out if the passed user has that object. can that be done? precisely: can i pass a object to a before filter?

thanks y

ps. is there any plugin or other interesting concept for ACLs?

hm, first when you find someone user.. like in application.rb controller.. before_filter :find_user def find_user ... @user = someone end You will have @user for all of controllers/views This mean you will be able to access/change @user instance from any ctrl/action so in some_controller.rb like that : before_filter :do_something def do_something    if @user.name == "alexey" do { .... } end