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

Hyrax::AdministrativeSet does not support #permission_template #5400

Closed
elrayle opened this issue Jan 27, 2022 · 0 comments
Closed

Hyrax::AdministrativeSet does not support #permission_template #5400

elrayle opened this issue Jan 27, 2022 · 0 comments

Comments

@elrayle
Copy link
Contributor

elrayle commented Jan 27, 2022

Descriptive summary

When editing an admin set, the view hyrax/admin/admin_sets/_form_visibility.html.erb uses @form.permission_template to construct the form allowing the user to add access. Similarly, the views hyrax/admin/admin_sets/_form_participants.html.erb and hyrax/admin/admin_sets/_form_workflow.html.erb also use @form.permission_template.

When working with Hyrax::AdministrativeSet (Valkyrie::Resource), the Hyrax::AdministrativeSetForm (Valkyrie::ChangeSet) is used. At this time, it does not support #permission_template. This error impacts Visibility, Sharing, and Workflow tabs of the admin set edit form.

Rationale

Working with AF Collections or Valkyrie Collections, the all admin set tabs on the edit form should work.

Expected behavior

Editing a Hyrax::AdministrativeSet should load the edit form, including all tabs.

Actual behavior

Editing a Hyrax::AdministrativeSet fails to load the edit form for multiple reasons. One includes the inability to load the Visibility, Sharing, and Workflow tabs because the @form object does not support the #permission_template method.

image

Steps to reproduce the behavior

Prerequisites:

Edit /config/initializers/hyrax.rb and set:

  config.admin_set_model = "Hyrax::AdministrativeSet"

To reproduce:

  1. navigate to Dashboard -> Collections
  2. click button: New Collection
  3. select type: Admin Set
  4. click button: Create Collection
  5. set Title: My Admin Set (or other meaningful name)
  6. click Save (this loads the editor for the admin set)

The error will occur as the edit form tries to load.

NOTE: There may be other errors once this error is resolved.

Related work

See related issues in Issue #5326 UBER: Hyrax-Valkyrization MVP
Issue #5329 is the same error for Collections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant