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

Display superadmin settings when user has appropriate permissions #2411

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

ShanaLMoore
Copy link
Collaborator

@ShanaLMoore ShanaLMoore commented Jan 14, 2025

Issue:

For PALS, previously, superadmin settings like oai_prefix, oai_sample_identifier, and s3_bucket were being filtered out because public_settings wasn't taking the user's permissions into account, if set. This adds a permission check and passes it to public_settings to dynamically show/hide superadmin settings based on user role.

BEFORE

image

AFTER

image

EXPECTATIONS

  1. When looged in as super admin, extra settings should be availabile.
  2. The setting form should match production:

image

Issue:
- notch8/palni_palci_knapsack#71

Previously, superadmin settings like oai_prefix, oai_sample_identifier, and s3_bucket were being filtered out because public_settings wasn't taking the user's permissions into account, if set. This adds a permission check and passes it to public_settings to
dynamically show/hide superadmin settings based on user role.
@ShanaLMoore ShanaLMoore added the patch-ver for release notes label Jan 14, 2025
Copy link

Test Results

    3 files  ±0      3 suites  ±0   17m 51s ⏱️ -6s
2 055 tests ±0  1 999 ✅ ±0  56 💤 ±0  0 ❌ ±0 
2 082 runs  ±0  2 024 ✅ ±0  58 💤 ±0  0 ❌ ±0 

Results for commit bb8a37a. ± Comparison against base commit 71dfcb5.

This pull request removes 42 and adds 42 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 a6f5949f-cbf1-4fe5-8fe5-00c60a7510f6
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit aa3c4e56-2608-4581-b551-2794e97a4f35
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read b4eea761-87a5-43bb-bec8-68fe792136e3
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 819dea1f-2582-4164-86aa-464182c89dd2
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy ab1e1b99-d3d1-4448-8d4d-8af99d1acae0
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 940fe4cc-215c-4351-acf8-aa1328706b53
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read eda4c34c-34e3-4be7-833c-e3ce324c492f
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update d8100201-c0f2-4d19-820f-9e086f2ab0dc
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy c73889f6-46ee-4c4a-b935-dc637dbd21f8
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit b6114df1-423b-4c63-954e-fa4692eb368a
…
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to destroy 718a4225-efd5-41a9-85cc-7a93f2166969
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to edit 9d39e4ac-6b9a-475e-8d4c-de47214ed5d9
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to read fcc6cd62-09a1-4a60-b6d1-aea4c8edeb60
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor Etd permissions is expected not to be able to update 55ce02c7-84fe-474d-800a-b9c190a6c818
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to destroy c4bbba4d-21a7-4d5f-baa8-4c02609198d5
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to edit 63fa3ff7-ae9a-457f-87ef-a1d856e2d76d
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to read 9fb63d82-96dc-4e2f-ad0b-f9574da6c0b6
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor FileSet permissions is expected not to be able to update 3f7413f8-94d4-48b1-ae64-545b9f3481b7
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to destroy 134c6a94-49c0-4aa8-8f7c-701f3feb6c52
spec.abilities.work_ability_spec ‑ Hyrax::Ability::WorkAbility when work depositor GenericWork permissions is expected not to be able to edit b4cf72d4-af18-46f8-88cc-a6e668b812ee
…

@ShanaLMoore ShanaLMoore marked this pull request as ready for review January 14, 2025 22:30
Copy link
Collaborator

@sjproctor sjproctor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@ShanaLMoore ShanaLMoore merged commit d1c5331 into main Jan 14, 2025
8 of 9 checks passed
@ShanaLMoore ShanaLMoore deleted the i71-superadmin-setting-display-issue branch January 14, 2025 22:50
ShanaLMoore added a commit to notch8/palni_palci_knapsack that referenced this pull request Jan 14, 2025
Pulls in fix for missing superadmin settings in PALS.

ref:
- samvera/hyku#2411

Issue:
- #71
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants