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
Closed
UISAUTHCOM-96 - Sunflower BF - Some applications that are visible on the Role Detail page are hidden on the Role Edit page. #151JohnC-80 wants to merge 64 commits into
JohnC-80 wants to merge 64 commits into
Conversation
…ity = true` since they are invalid. (#84)
bump version to 2.0.1
…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.
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)
Release v2.1.0
* [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>
…ntered in required `Role Name` field. (#146)
…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
…ble capabilities - inherited and not
…plications to the Role Edit view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=falsewas set on theuseRoleCapabilitiesso 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=truepulls 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
selectedCapabilitiesMapis now obtained by filtering out the set-owned capabilitiesfrom the now-expanded
initialRoleCapabilitiesSelectedMapthis happens in theisInitialDataReadyuseEffect, which is used to initialize theselectedCapabilitiesMapstate.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
directfield on capabilities, so it's must easier for the UI to distinguish directly-assigned capabilities vs inherited ones.