Resque auth
Created by: glebm
Major WTF
Why not just do something like this:
class Authentication
def initialize(app)
@app = app
end
def call(env)
account = env['warden'].authenticate!(:database_authenticatable, :rememberable, scope: :account)
raise "Access denied" if !account.admin?
@app.call(env)
end
end
Resque::Server.use Authentication
And we could put the resque in an iframe...