akodkod / solid-queue-dashboard

MIT License
109 stars 4 forks source link

auth override like mission control possible? #3

Open thisIsLoading opened 1 month ago

thisIsLoading commented 1 month ago

mission control has this nice feature:where you could override the base class of its controller

Rails.application.configure do
  MissionControl::Jobs.base_controller_class = "MissionControlController"
end

my controller looks like this:

class MissionControlController < ApplicationController
  skip_before_action :require_authentication
  before_action :require_admin!

  private

  def require_admin!
    authorize :admin, :index?
  end
end

you think this would be possible? or do you suggest another way without basic auth for users without devise?

thanks a lot for this excellent work

akodkod commented 1 month ago

@thisIsLoading Great idea! I’ll be sure to include this feature in the next release. Thanks!