Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated reset_access_controls! #6376

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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