Skip to content

Commit

Permalink
Merge pull request #6376 from samvera/rm-dep-reset-acl
Browse files Browse the repository at this point in the history
Remove deprecated `reset_access_controls!`
  • Loading branch information
dlpierce authored Oct 20, 2023
2 parents 07e858d + 2620d2f commit f6554a1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
7 changes: 0 additions & 7 deletions app/forms/hyrax/forms/permission_template_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion spec/forms/hyrax/forms/permission_template_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion spec/models/collection_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
Expand Down

0 comments on commit f6554a1

Please sign in to comment.