Skip to content

Commit

Permalink
Points Hyrax::EditPermissionsService.build_service_object_from to Hyr…
Browse files Browse the repository at this point in the history
…ax configuration variable.

For L#44, the `if` test's subject is hard-coded and unaware of any customized form class that the Hyrax Engine's implementers could create and set inside the Engine's configuration. This swaps to the configuration variable that defaults to the same hard-coded class (`Hyrax::Forms::FileSetForm`).
  • Loading branch information
bwatson78 committed Jul 24, 2024
1 parent 59a42ad commit 2dac8fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/hyrax/edit_permissions_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def self.build_service_object_from(form:, ability:)
# (+Hyrax::Forms::FileSetForm+), +:in_works_ids+ is prepopulated onto
# the form object itself. For +Hyrax::Forms::FileSetEditForm+, the
# +:in_works+ method is present on the wrapped +:model+.
if form.object.is_a?(Hyrax::Forms::FileSetForm)
if form.object.is_a?(Hyrax.config.file_set_form)
object_id = form.object.in_works_ids.first
new(object: Hyrax.query_service.find_by(id: object_id), ability: ability)
else
Expand Down

0 comments on commit 2dac8fc

Please sign in to comment.