Skip to content

UISAUTHCOM-96 Role Edit missing capabilities/applications - U10f version. - #154

Open
JohnC-80 wants to merge 3 commits into
masterfrom
UISAUTHCOM-96-u10f
Open

UISAUTHCOM-96 Role Edit missing capabilities/applications - U10f version.#154
JohnC-80 wants to merge 3 commits into
masterfrom
UISAUTHCOM-96-u10f

Conversation

@JohnC-80

@JohnC-80 JohnC-80 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

UISAUTHCOM-96 Umbrellaleaf (U10f) version.

#153 except only a single request is necessary since https://folio-org.atlassian.net/browse/MODROLESKC-408 is deployed on snapshot.

Approach

I added "Direct" version of output key for useRoleCapabilites hook: initialDirectCapabilitiesSelectedMap. I used this in the role form. Existing output keys were left untouched for other views that use them.

Tidy up that initial state of direct capabilities with expand = true -

image

Bugfix: (Same capabilities/apps on Edit screen as appear on the Details)

2026-08-13_16h39_09.mp4

Direct/Inherited Checkbox behavior

2026-08-13_16h43_54.mp4

Cross-session persistence

2026-08-14_10h37_20.mp4

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown

Jest Unit Test Results

  1 files  ±0   57 suites  ±0   1m 43s ⏱️ +27s
233 tests +1  232 ✅ +1  1 💤 ±0  0 ❌ ±0 
241 runs  +1  240 ✅ +1  1 💤 ±0  0 ❌ ±0 

Results for commit 00a5091. ± Comparison against base commit 1254183.

This pull request removes 2 and adds 3 tests. Note that renamed tests count towards both.
RoleEdit should call useRoleCapabilities with expand=false to exclude set-inherited capabilities from initial state ‑ RoleEdit should call useRoleCapabilities with expand=false to exclude set-inherited capabilities from initial state
RoleEdit should initialize selectedCapabilitiesMap from expand=false result, excluding set-inherited capabilities ‑ RoleEdit should initialize selectedCapabilitiesMap from expand=false result, excluding set-inherited capabilities
RoleEdit should call useRoleCapabilities with expand=true to get all inherited and direct capabilityAppIds ‑ RoleEdit should call useRoleCapabilities with expand=true to get all inherited and direct capabilityAppIds
RoleEdit should initialize selectedCapabilitiesMap from initialDirectCapabilitiesSelectedMap, excluding set-inherited capabilities ‑ RoleEdit should initialize selectedCapabilitiesMap from initialDirectCapabilitiesSelectedMap, excluding set-inherited capabilities
useRoleCapabilities returns an empty initialDirectCapabilitiesSelectedMap when no capabilities are direct ‑ useRoleCapabilities returns an empty initialDirectCapabilitiesSelectedMap when no capabilities are direct

♻️ This comment has been updated with latest results.

@sonarqubecloud

Copy link
Copy Markdown

@JohnC-80
JohnC-80 marked this pull request as ready for review August 13, 2026 21:40
@JohnC-80
JohnC-80 requested a review from a team August 14, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant