diff --git a/Gemfile.lock b/Gemfile.lock index d91d4b5aa5..ae7b4e377c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -507,7 +507,7 @@ GEM public_suffix (5.0.5) puma (6.4.2) nio4r (~> 2.0) - pundit (2.3.1) + pundit (2.3.2) activesupport (>= 3.0.0) raabro (1.4.0) racc (1.8.0) diff --git a/app/controllers/publish/providers/schools_check_controller.rb b/app/controllers/publish/providers/schools_check_controller.rb index 25a7ef9d9d..4cc2d9ef42 100644 --- a/app/controllers/publish/providers/schools_check_controller.rb +++ b/app/controllers/publish/providers/schools_check_controller.rb @@ -3,7 +3,7 @@ module Publish module Providers class SchoolsCheckController < PublishController - before_action :pundit + before_action :authorise_with_pundit before_action :new_form def show; end @@ -19,7 +19,7 @@ def update private - def pundit + def authorise_with_pundit authorize provider, :show? end diff --git a/app/controllers/publish/providers/schools_controller.rb b/app/controllers/publish/providers/schools_controller.rb index c25dc1495e..2c498d177d 100644 --- a/app/controllers/publish/providers/schools_controller.rb +++ b/app/controllers/publish/providers/schools_controller.rb @@ -3,7 +3,7 @@ module Publish module Providers class SchoolsController < PublishController - before_action :pundit + before_action :authorise_with_pundit before_action :site, only: %i[show delete] def index @@ -56,7 +56,7 @@ def destroy private - def pundit + def authorise_with_pundit authorize provider, :show? end diff --git a/app/controllers/publish/providers/study_sites_check_controller.rb b/app/controllers/publish/providers/study_sites_check_controller.rb index a1bf3e86e4..c429e4666b 100644 --- a/app/controllers/publish/providers/study_sites_check_controller.rb +++ b/app/controllers/publish/providers/study_sites_check_controller.rb @@ -3,7 +3,7 @@ module Publish module Providers class StudySitesCheckController < PublishController - before_action :pundit + before_action :authorise_with_pundit before_action :new_form def show; end @@ -19,7 +19,7 @@ def update private - def pundit + def authorise_with_pundit authorize provider, :show? end diff --git a/app/controllers/publish/providers/study_sites_controller.rb b/app/controllers/publish/providers/study_sites_controller.rb index e398b5ef02..4892af14ac 100644 --- a/app/controllers/publish/providers/study_sites_controller.rb +++ b/app/controllers/publish/providers/study_sites_controller.rb @@ -3,7 +3,7 @@ module Publish module Providers class StudySitesController < PublishController - before_action :pundit + before_action :authorise_with_pundit before_action :site, only: %i[show delete] before_action :build_study_site, only: %i[new create] @@ -55,7 +55,7 @@ def destroy private - def pundit + def authorise_with_pundit authorize provider, :show? end