Skip to content

UISAUTHCOM-96 - Sunflower BF - Some applications that are visible on the Role Detail page are hidden on the Role Edit page. - #151

Closed
JohnC-80 wants to merge 64 commits into
b2.0from
UISAUTHCOM-96
Closed

UISAUTHCOM-96 - Sunflower BF - Some applications that are visible on the Role Detail page are hidden on the Role Edit page. #151
JohnC-80 wants to merge 64 commits into
b2.0from
UISAUTHCOM-96

Conversation

@JohnC-80

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

Copy link
Copy Markdown
Contributor

UISAUTHCOM-96

Purpose

The Role Edit page is missing application entries that are present on the Role Details page.

Approach

History:
Previous changes applied expand=false which provided a convenient set of directly-assigned capabilities,but also removed certain applications from checkedAppsIdsMap that were only present via capability sets.

With the fix for UISAUTHCOM-83: https://folio-org.atlassian.net/browse/UISAUTHCOM-83
expand=false was set on the useRoleCapabilities so that tbe API returns only directly-assigned capabilities (not those inherited from capability sets). This keeps allowed for distinction between directly-assigned capabilities and those inherited from a Capabilities Set.

Changes applied with this PR:
expand=true pulls in capabilities that are present via capability set in addition to directly-assigned capabilities.
This is needed so that owning applications of set-owned capabilities from the Role Detail page will not be excluded from this view. The data flows as follows:
This 'expanded' response -> capabilitiesAppIds -> checkedAppIdsMap -> useApplicationCapabilities ->
ultimately populate the edit view's capabilities table and check application checkboxes.

The selectedCapabilitiesMap is now obtained by filtering out the set-owned capabilities
from the now-expanded initialRoleCapabilitiesSelectedMap this happens in the isInitialDataReady
useEffect, which is used to initialize the selectedCapabilitiesMap state.

Check/uncheck behavior of Capability Sets is maintained in the current editing session, but currently does not persist - this was the acceptable trade-off for the related applications display.

The capabilities endpoint in >= Trillium includes the direct field on capabilities, so it's must easier for the UI to distinguish directly-assigned capabilities vs inherited ones.

ryandberger and others added 30 commits April 7, 2025 08:44
…es` that used in `useInitalRoleSharing` to correctly retrieve directly assigned capabilities (#87)

Refs UISAUTHCOM-51.
#92)

* Make role details users links clickable only in settings

* Add new isClickableRolesUsers prop instead

* Rename isClickableRolesUsers to isUserLinkEnabled

* Add hideUserLink instead to preserve existing functionality

* Update change log

* Add tests

* Remove hideUserLink default value from RoleDetails

* Format change log
…eEditRoleMutation (#91)

Co-authored-by: Zak Burke <zburke@ebsco.com>
…rtain actions can be performed (#101)

* UISAUTHCOM-65 Provide the ability to pass props to control whether certain actions can be performed

* update tests
…equest (#106)

* [UISAUTHCOM-67] Match GET role capabilities query key to match edit request, so `react-query` `invalidateQueries()` is called and new data is fetched.

* Undo not needed change
…user records in batch are attempted (#107)

* Group error API error messages together to report affected user IDs

* Refactor into function

* Lint fixes

* Move function to utils and add tests

* Move IF statement per PR comments

* Update unit tests
…cking an application. (#109)

* Initial implementation

* Further progress

* Working modal

* Fix logic flow and add tests/comments

* Lint fixes

* PR feedback

* PR feedback

* Remove extra space.

* Fix test
…110)

* Fix slowness when typing in name/description fields, by having component re-render onBlur instead of every keystroke.

* Fix unit test
…Role (#111)

* Add use case for create role

* Add unit tests

* Address PR comments, lint

* Remove unused property
https://folio-org.atlassian.net/browse/UISAUTHCOM-72

In the Consortium Manager app (available only in the central tenant), when viewing entities (e.g. Authorization Roles) that belong to a member tenant, the <ViewMetaData> component attempts to resolve user IDs (from metadata.createdByUserId / updatedByUserId) in the central tenant context.
As a result, metadata fields display Unknown user, since the central tenant does not contain these user records.

> **NB:** Requires folio-org/stripes-smart-components#1610
>
> This update adds tenantId support to <ViewMetaData>, but the feature requires @folio/stripes version ^10.1.0, where the updated ViewMetaData implementation is available.
Since the current peer-dependency is set to ^10.0.0, this change will not take effect until the consuming environment uses @folio/stripes@^10.1.0.
>
> No breaking changes are introduced — additional props are passed as optional arguments and safely ignored by older versions.
folio-translations and others added 27 commits January 26, 2026 19:14
Lokalise: Translations update
…lso deslects all child capabilities. (#128)

* Ensure that deselecting a column of capability sets also deslects all child capabilities.

* Add unit test
Lokalise: Translations update
Lokalise: Translations update
…ith the same name already exists in data tenant (#131)

* UISAUTHCOM-86 Handling sharing of a role when an authorization role with the same name already exists in data tenant

* update tests
… a capability set that includes them. Keep `isInitialDataReady` false while fetching data to prevent stale data from being displayed after the page is reopened. (#133)
`<Pluggable>` counts its children, expecting only one (because only one
plugin can match any given `type`), but a leading space in the fallback
message causes children to be shaped like `[" ", "fallback message"]`,
a real red herring when trying to debug plugin-related problems.

Refs UISAUTHCOM-87

Co-authored-by: Ryan Berger <rberger@ebsco.com>
…et after selecting a checkbox for a set that includes the initial capabilities. (#136)
…and server error handling (#138)

* UISAUTHCOM-86 Introduce RoleMutationClientError to separate client and server error handling

* add tests
…enants when editing shared authorization roles (#139)
* [UISAUTHCOM-93] Send full object body in PUT /roles request.

Co-authored-by: Copilot <copilot@github.com>

* Add unit tests

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
…for warning when de-selecting an application assigned to a role. (#142)

* First pass at reworking unselected capability counts

Co-authored-by: Copilot <copilot@github.com>

* Working solution

* Updated CHANGELOG

* Fix tests and lint

Co-authored-by: Copilot <copilot@github.com>

* Update comments

Co-authored-by: Copilot <copilot@github.com>

* Fix skipped test

* Lint fixes

Co-authored-by: Copilot <copilot@github.com>

* Sonar fix

---------

Co-authored-by: Copilot <copilot@github.com>
…cking a capability set. (#147)

* [UIROLES-196] Display warning and require confirmation before unchecking a capability set

* Display cap set name and use basic confirm until bug in SessionConfirmationModal is fixed which causes too many re-renders on confirm.

* Update comments

* Simplify utils

* Lint fixes

* Add unit tests

* Lint fixes

* Add unit test coverage
* add vanilla validation to RoleForm name field

* log changes

* update tests, move validations to centralized validations file.

* fix minor lint

* don't provide the blurred feedback if the field is focused

* Update error message for invalid character in role name

* minor for bump
@JohnC-80 JohnC-80 changed the title UISAUTHCOM-96 - Some applications that are visible on the Role Detail page are hidden on the Role Edit page. UISAUTHCOM-96 - Sunflower BF - Some applications that are visible on the Role Detail page are hidden on the Role Edit page. Aug 12, 2026
@JohnC-80 JohnC-80 closed this Aug 12, 2026
@JohnC-80
JohnC-80 deleted the UISAUTHCOM-96 branch August 12, 2026 22:14
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.

10 participants