diff --git a/app/controllers/hyrax/dashboard/collections_controller.rb b/app/controllers/hyrax/dashboard/collections_controller.rb index e9bac01971..ea17c5a532 100644 --- a/app/controllers/hyrax/dashboard/collections_controller.rb +++ b/app/controllers/hyrax/dashboard/collections_controller.rb @@ -337,9 +337,10 @@ def collection_params def extract_old_style_permission_attributes(attributes) # TODO: REMOVE in 3.0 - part of deprecation of permission attributes - Deprecation.warn(self, "passing in permissions with a new collection is deprecated and will be removed from Hyrax 3.0 ()") # TODO: elr - add alternative in () permissions = attributes.delete("permissions_attributes") return [] unless permissions + Deprecation.warn(self, "Passing in permissions_attributes parameter with a new collection is deprecated and support will be removed from Hyrax 3.0. " \ + "Use Hyrax::PermissionTemplate instead to grant Manage, Deposit, or View access.") participants = [] permissions.each do |p| access = access(p) diff --git a/spec/controllers/hyrax/dashboard/collections_controller_spec.rb b/spec/controllers/hyrax/dashboard/collections_controller_spec.rb index 51cb68934e..9d6a3c0716 100644 --- a/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +++ b/spec/controllers/hyrax/dashboard/collections_controller_spec.rb @@ -39,6 +39,9 @@ post :create, params: { collection: collection_attrs.merge( visibility: 'open', + # TODO: Tests with old approach to sharing a collection which is deprecated and + # will be removed in 3.0. New approach creates a PermissionTemplate with + # source_id = the collection's id. permissions_attributes: [{ type: 'person', name: 'archivist1', access: 'edit' }]