It's a following of the Resque, Devise and admin authentication question.
Assuming we have:
User.last.role #=> 'admin'
New issue is: how to get an access to current user (as i have User.role which can be 'admin' or 'user') from this:
require 'resque/server'
class SecureResqueServer < Resque::Server
before do
#redirect '/login' unless current_user.role == 'admin'
end
end
Thank you.