You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It ships with an extremely simple to use Sinatra app for viewing and managing your worker queues. However, this Sinatra app (called resque-web) gets mounted unprotected by Devise initially.
Luckily, there is a simple way to add Devise authentication to the resque-web front end app.
#routes.rb
...
devise_for:admin_users,ActiveAdmin::Devise.configauthenticate:admin_userdo#replace admin_user(s) with whatever model your users are stored in.mountResque::Server.new,:at=>"/jobs"end
...
That's it! If an un-authenticated user attempts to visit /jobs they'll get redirected to your devise login page, after logging in devise will redirect them back to the /jobs URL. (Or whatever URL they were attempting to access, /jobs/schedule etc.)
If you'd like to do additional authorization checks (eg: if the logged in user is an admin), here's one way to achieve this: