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
96 stars 49 forks source link

Add per-tenant Bulkrax field mappings #2384

Closed bkiahstroud closed 4 days ago

bkiahstroud commented 6 days ago

Summary

In multi-tenant Hyku applications, different tenants can have different requirements for field mappings. This is usually fine for the :from setting; if one tenant has a column named title_alpha and another title_beta, both can be added to the title's field mapping :from setting.

However, conflicts arise when tenants have different requirements for other settings, such as :split or deciding which field should be considered the source_identifier. In those cases, having a single, static field mapping config doesn't work.

This PR introduces a new Account settings as well as an override to Bulkrax to allow for configuring field mappings completely independently on a per-tenant basis.

Screenshots

New account default settings image
Override possible by admins within tenant image
JSON validation ![image](https://github.com/user-attachments/assets/ce6e5325-0713-48e7-aed7-bfc56231602b)
Importer uses tenant field mappings image

@samvera/hyku-code-reviewers

github-actions[bot] commented 6 days ago

Test Results

    3 files  ±0      3 suites  ±0   18m 18s ⏱️ +19s 2 047 tests +7  1 997 ✅ +7  50 💤 ±0  0 ❌ ±0  2 074 runs  +7  2 022 ✅ +7  52 💤 ±0  0 ❌ ±0 

Results for commit 78026913. ± Comparison against base commit 2ea73b91.

This pull request removes 42 and adds 49 tests. Note that renamed tests count towards both. ``` spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 41f860dc-5377-44b5-afe7-c219233d157c spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 00c81bee-60c8-4965-a3bc-f491078ffdb9 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 809b1def-0a6d-4079-bd97-45383a7a10d4 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 4a7f6a2a-2cad-4445-9db5-dd6184e6f87f spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 52b2c4c3-41d0-4d78-b921-2e040231086f spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 46047960-610f-412f-bd22-12fd2fefecc3 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 3c2180b6-62c8-4200-a8da-91aa950a8bed spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update d4f702cb-e5b6-4c35-8de2-c3badb8d9581 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 3ca1598a-fbfe-49a2-aac7-7821d2dffaac spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit ee2e2cea-c450-47a2-8287-2b1bb3a2227d … ``` ``` spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 61e03ffa-d09f-4203-9959-c896aed57a95 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 5a7ff8fa-9aaf-438c-a7b5-39fad17e5bf0 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read 8a4a8333-327a-4bf0-b496-98fee42470a4 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update e976b9e0-6735-4f90-9925-224909e8012d spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy 4d917f28-044b-4142-bdb5-93ce0927a05b spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit ec2a3aea-d1fe-4ebe-8e4f-aa75c9fb0380 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 5815197a-9d76-4f38-9a9b-86d177566838 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 5345588c-2019-4db5-a31e-3ad51c584f19 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 4dc07117-6ee7-479d-aae8-37daec688a27 spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit 211e7150-f652-4fe1-ae48-5861b8abaa42 … ```

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