Skip to content

Commit

Permalink
UISAUTHCOM-48: fix cap set remains assigned after selecting and then …
Browse files Browse the repository at this point in the history
…deselecting it when creating an authorization role (#76)

Refs UISAUTHCOM-48.
  • Loading branch information
aidynoJ authored Feb 28, 2025
1 parent 20ae074 commit 948fb51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Change history for stripes-authorization-components

## [1.0.3](https://github.com/folio-org/stripes-authorization-components/tree/v1.0.3) (2025-02-07)
[Full Changelog](https://github.com/folio-org/stripes-authorization-components/compare/v1.0.1...v1.0.3)

* [UISAUTHCOM-48](https://folio-org.atlassian.net/browse/UISAUTHCOM-48) Fix capability set remains assigned after selecting and then deselecting it when creating an authorization role

## [1.0.2](https://github.com/folio-org/stripes-authorization-components/tree/v1.0.2) (2025-02-07)
[Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v1.0.1...v1.0.2)
[Full Changelog](https://github.com/folio-org/stripes-authorization-components/compare/v1.0.1...v1.0.2)

* [UISAUTHCOM-43](https://folio-org.atlassian.net/browse/UISAUTHCOM-43) Fix capabilities from unselected application sometimes shown as assigned for a role after editing.

## [1.0.1](https://github.com/folio-org/stripes-authorization-components/tree/v1.0.1) (2024-11-08)
[Full Changelog](https://github.com/folio-org/stripes-acq-components/compare/v1.0.0...v1.0.1)
[Full Changelog](https://github.com/folio-org/stripes-authorization-components/compare/v1.0.0...v1.0.1)

* [UISAUTHCOM-36](https://folio-org.atlassian.net/browse/UISAUTHCOM-36) Avoid extra capability requests for role sharing when not in central tenant
* [UISAUTHCOM-37](https://folio-org.atlassian.net/browse/UISAUTHCOM-37) ECS - Add Tenant identifier to title of Select user modal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useEffect, useMemo, useState } from 'react';

import isEmpty from 'lodash/isEmpty';
import {
extractSelectedIdsFromObject,
getCapabilitiesGroupedByTypeAndResource,
} from '../../utils';
import { useChunkedApplicationCapabilitySets } from '../useChunkedApplicationCapabilitySets';
Expand Down Expand Up @@ -32,7 +33,7 @@ export const useApplicationCapabilitySets = ({ checkedAppIdsMap, options = {} })
} = useChunkedApplicationCapabilitySets(selectedAppIds, { tenantId });

const [selectedCapabilitySetsMap, setSelectedCapabilitySetsMap] = useState({});
const roleCapabilitySetsListIds = Object.keys(selectedCapabilitySetsMap);
const roleCapabilitySetsListIds = extractSelectedIdsFromObject(selectedCapabilitySetsMap);

const roleCapabilitySetsListNames = useMemo(() => {
const capabilitySetsMap = keyBy(capabilitySets, 'id');
Expand Down

0 comments on commit 948fb51

Please sign in to comment.