diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index d852018d..cd338bc4 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,5 @@ class ApplicationController < ActionController::Base + include Pundit::Authorization # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. # protect_from_forgery with: :exception @@ -9,7 +10,6 @@ class ApplicationController < ActionController::Base before_action :get_global_doodads if (Rails.env.development? || Rails.env.test?) - include Pundit::Authorization after_action :verify_authorized, unless: -> { devise_controller? } # after_action :verify_policy_scoped, only: :index rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized