From 4f2b7094d0cf64f2ec33cbb0faacf239021ca0ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Turbelin?= Date: Wed, 2 Sep 2020 21:48:13 +0200 Subject: [PATCH] Use before_action instead of before_filter --- .../app/controllers/dfc_provider/api/base_controller.rb | 2 +- .../app/controllers/dfc_provider/api/people_controller.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/dfc_provider/app/controllers/dfc_provider/api/base_controller.rb b/engines/dfc_provider/app/controllers/dfc_provider/api/base_controller.rb index 0e206aa71c..0fe7de959b 100644 --- a/engines/dfc_provider/app/controllers/dfc_provider/api/base_controller.rb +++ b/engines/dfc_provider/app/controllers/dfc_provider/api/base_controller.rb @@ -6,7 +6,7 @@ module DfcProvider class BaseController < ::ActionController::Base rescue_from ActiveRecord::RecordNotFound, with: :not_found - before_filter :check_authorization, + before_action :check_authorization, :check_user, :check_enterprise diff --git a/engines/dfc_provider/app/controllers/dfc_provider/api/people_controller.rb b/engines/dfc_provider/app/controllers/dfc_provider/api/people_controller.rb index 02852ec084..2da4b7c4fe 100644 --- a/engines/dfc_provider/app/controllers/dfc_provider/api/people_controller.rb +++ b/engines/dfc_provider/app/controllers/dfc_provider/api/people_controller.rb @@ -4,9 +4,9 @@ module DfcProvider module Api class PeopleController < BaseController - skip_before_filter :check_enterprise + skip_before_action :check_enterprise - before_filter :find_user, :check_user_accessibility + before_action :find_user, :check_user_accessibility def show render json: @user, serializer: DfcProvider::PersonSerializer