samvera / hyku

Hyku: A multi-tenant Hyrax application built on the latest and greatest Samvera community components. Brought to you by the Hydra-in-a-Box project partners and IMLS; maintained by the Hyku Interest Group.
https://samvera.atlassian.net/wiki/spaces/hyku/overview
Other
94 stars 46 forks source link

:bug: [i51] Fix for collection sharing bug #2236

Closed ShanaLMoore closed 2 weeks ago

ShanaLMoore commented 4 weeks ago

Before this commit, adding sharing to a collection would result in an error. The form was sending the value of "false" instead of the selected access.

Issue:

BEFORE

Failed silently and did not add selections to the form. This is because access params was set to false instead of the actual selected value.

#<ActionController::Parameters {"access_grants_attributes"=>#<ActionController::Parameters {"0"=>#<ActionController::Parameters {"access"=>"false", "agent_id"=>"registered", "agent_type"=>"group"} permitted: true>} permitted: true>} permitted: true>

https://github.com/scientist-softserv/palni_palci_knapsack/assets/84697174/d6c4b44e-c6ae-435d-9090-aa2973361bc0

AFTER

image

Screenshot 2024-06-04 at 15-39-31 Edit User Collection collection test __ Hyku

github-actions[bot] commented 4 weeks ago

Test Results

    3 files  ±0      3 suites  ±0   16m 25s :stopwatch: +38s 1 753 tests ±0  1 720 :white_check_mark:  - 3  30 :zzz: ±0  3 :x: +3  1 772 runs  ±0  1 737 :white_check_mark:  - 3  32 :zzz: ±0  3 :x: +3 

For more details on these failures, see this check.

Results for commit 7fa2bc06. ± Comparison against base commit 0c5793b6.

This pull request removes 26 and adds 26 tests. Note that renamed tests count towards both. ``` spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 39a7a3ab-e31d-478c-ae84-ebccde9c02c2 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit cdf3e882-bb77-46f9-93a3-72290ede593f spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 9c011c4a-7c2c-4bcb-8a49-60af4ca49a67 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update fe79dbb2-d34b-4c72-a128-d6be7d2ef7c6 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy f9c816b0-c623-4f77-8562-563985d34906 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 7e5da0f7-3159-421d-bb73-ddbcd5e5485d spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to read d9219ee4-447b-4b12-b095-557012ad6eac spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to update 44e82f08-6099-4ed2-9259-2a5521a3faf1 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Image permissions is expected not to be able to destroy 6a41708e-1850-4c4e-860f-81cdc4507972 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Image permissions is expected not to be able to edit 2ee4ec55-6740-44f9-82a8-d5b6961b8280 … ``` ``` spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 9b1b974f-1c9d-4bfa-b0d8-d7d9df39ecee spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 81cebe1b-ea50-47ad-bf54-082011275848 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 0c0cdc56-c4b6-4d63-8dc8-9a2daaf7ba82 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 92bf9dad-fec4-4173-9f4a-da3e5f81b591 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 82520a01-cd62-4ee6-8810-200e29912645 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 54655407-0edb-4930-8bb6-0f3dc2972fe4 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to read 11c315af-0050-44c0-b7b5-0ed12023e537 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to update 7f3967dc-e48b-4399-b5f5-be7da26b0c3b spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Image permissions is expected not to be able to destroy 2f70ae57-7ec5-4b3d-abfb-e2c8d327119d spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Image permissions is expected not to be able to edit 91f44a50-c126-45c3-ae59-1b5cb864e5d0 … ```

:recycle: This comment has been updated with latest results.

ShanaLMoore commented 4 weeks ago

I'm putting this back in draft to confirm if the failures are legit.