From 2620d2f9ae9bc0de1688891a84310faf4e9804bd Mon Sep 17 00:00:00 2001 From: Daniel Pierce Date: Fri, 20 Oct 2023 12:17:35 -0400 Subject: [PATCH] Remove deprecated `reset_access_controls!` --- app/forms/hyrax/forms/permission_template_form.rb | 7 ------- spec/forms/hyrax/forms/permission_template_form_spec.rb | 1 - spec/models/collection_spec.rb | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/app/forms/hyrax/forms/permission_template_form.rb b/app/forms/hyrax/forms/permission_template_form.rb index bb41c2245a..2c4e91097a 100644 --- a/app/forms/hyrax/forms/permission_template_form.rb +++ b/app/forms/hyrax/forms/permission_template_form.rb @@ -9,13 +9,6 @@ class PermissionTemplateForm delegate :access_grants, :access_grants_attributes=, :release_date, :release_period, :visibility, to: :model delegate :available_workflows, :active_workflow, :source, :source_id, to: :model - ## - # @deprecated use PermissionTemplate#reset_access_controls_for instead. - def reset_access_controls! - Deprecation.warn("reset_access_controls! is deprecated; use PermissionTemplate#reset_access_controls_for instead.") - source_model.reset_access_controls! - end - # Stores which radio button under release "Varies" option is selected attr_accessor :release_varies # Selected release embargo timeframe (if any) under release "Varies" option diff --git a/spec/forms/hyrax/forms/permission_template_form_spec.rb b/spec/forms/hyrax/forms/permission_template_form_spec.rb index 3c757a75e1..4402372824 100644 --- a/spec/forms/hyrax/forms/permission_template_form_spec.rb +++ b/spec/forms/hyrax/forms/permission_template_form_spec.rb @@ -14,7 +14,6 @@ it { is_expected.to delegate_method(:source_model).to(:model) } it { is_expected.to delegate_method(:source_id).to(:model) } it { is_expected.to delegate_method(:visibility).to(:model) } - it { is_expected.to delegate_method(:reset_access_controls!).to(:source_model) } it 'is expected to delegate method #active_workflow_id to #active_workflow#id' do workflow = double(:workflow, id: 1234, active: true) diff --git a/spec/models/collection_spec.rb b/spec/models/collection_spec.rb index 9a5331bc8d..cc2e0d9ed7 100644 --- a/spec/models/collection_spec.rb +++ b/spec/models/collection_spec.rb @@ -201,7 +201,7 @@ class Member < ActiveFedora::Base end end - describe '#reset_access_controls!' do + describe 'permission_template reset_access_controls_for' do let!(:user) { build(:user) } let(:collection_type) { create(:collection_type) } let!(:collection) { FactoryBot.build(:collection_lw, user: user, collection_type: collection_type) }