From 1e2d55e02ef9d51d65779396bef344de241d565f Mon Sep 17 00:00:00 2001 From: "Jesse C. Fisher" Date: Tue, 5 Dec 2023 05:27:51 +0000 Subject: [PATCH] Pundit authorization sitewide --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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