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

[WIP] update AdminSetCreateService to create valkyrie resources #5083

Closed
wants to merge 8 commits into from

Commits on Sep 2, 2021

  1. update AdminSetCreateService to create valkyrie resources

    Add…
    * .`find_or_create_default_admin_set` = replacement for `AdminSet.find_or_create_default_admin_set_id`
    * `.default_admin_set?(id:)` = replacement for `AdminSet.default_set?`
    * `.call!` - returns object instead of true/false returned by `.call`
    * `#create!` - returns object instead of true/false returned by `#create`
    
    Deprecate
    * `.create_default_admin_set` - use `.find_or_create_default_admin_set` instead
    
    Publish
    * update metadata when adminset created
    
    rc
    elrayle committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    7eaaf33 View commit details
    Browse the repository at this point in the history
  2. replace AdminSet.find_or_create_default_admin_set_id with Hyrax::Admi…

    …nSetCreateService.find_or_create_default_admin_set.id
    elrayle committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    180d91b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f716966 View commit details
    Browse the repository at this point in the history
  4. update admin set controller & abilities to work with Hyrax::Administr…

    …ativeSet
    
    This is required for the UI to work with the changes to create admin sets using the Hyrax::AdminSetCreateService which is updated to use Valkryie.
    elrayle committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    9e0a9a0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    746677f View commit details
    Browse the repository at this point in the history
  6. only run lifecycle listeners for works and file sets

    NOTE: Indexing will still run all objects via metadata_index_listener which responds to the same messages.
    
    Also, still runs `on_object_deleted` since it operates on `id` only and does not attempt to generate a path.
    elrayle committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    d5ed164 View commit details
    Browse the repository at this point in the history
  7. remove check for :ensure_manager! in admin_sets_controller

    A TODO in the `AdminSetsController` suggested that `:ensure_manager!` is no longer needed.  I removed the `before_action`, ran tests, and tested in the UI with the following steps.  All look good.
    
    prereq
    * create admin user
    * create non-admin user
    
    1. login as admin
    2. create new admin set
    3. add non-admin user as a Manager
    4. logout and log back in as non-admin user
    5. navigate to Dashboard -> Collections -> Managed Collection (tab)
    6. click name of created admin set
    7. click Edit
    8. modify the description
    9. Save
    10. navigate to Dashboard -> Collections -> Managed Collection (tab)
    11. click name of created admin set
    12. confirm that the description was updated
    
    Based on these results, it appears that the TODO is correct and this check can be removed.
    elrayle committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    6be96a2 View commit details
    Browse the repository at this point in the history
  8. make test stub AdminSetCreateService as the service

    makes a few additional minor adjustments based on PR feedback
    elrayle committed Sep 2, 2021
    Configuration menu
    Copy the full SHA
    109c7e7 View commit details
    Browse the repository at this point in the history