Skip to content

Commit

Permalink
rename to useUserTenantPermissions
Browse files Browse the repository at this point in the history
  • Loading branch information
aidynoJ committed Nov 14, 2024
1 parent 354d35a commit 1ba21b4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Conditionally use `/users-keycloak/_self` endpoint when `users-keycloak` interface is present. Refs STCOR-835.
* Wait longer before declaring a rotation request to be stale. Refs STCOR-895.
* Send the stored central tenant name in the header on logout. Refs STCOR-900.
* Use the `users-keycloak/_self` endpoint conditionally when the `users-keycloak` interface is present; otherwise, use `bl-users/_self` within `useUserSelfTenantPermissions`. Refs STCOR-905.
* Use the `users-keycloak/_self` endpoint conditionally when the `users-keycloak` interface is present; otherwise, use `bl-users/_self` within `useUserTenantPermissions`. Refs STCOR-905.

## [10.2.0](https://github.com/folio-org/stripes-core/tree/v10.2.0) (2024-10-11)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.1.1...v10.2.0)
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export { useChunkedCQLFetch } from './src/queries';
export { getUserTenantsPermissions } from './src/queries';

/* Hooks */
export { useUserSelfTenantPermissions } from './src/hooks';
export { useUserTenantPermissions } from './src/hooks';

/* misc */
export { supportedLocales } from './src/loginServices';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as useUserSelfTenantPermissions } from './useUserSelfTenantPermissions';
export { default as useUserTenantPermissions } from './useUserTenantPermissions'; // eslint-disable-line import/prefer-default-export
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useOkapiKy from '../useOkapiKy';

const INITIAL_DATA = [];

const useUserSelfTenantPermissions = (
const useUserTenantPermissions = (
{ tenantId },
options = {},
) => {
Expand Down Expand Up @@ -49,4 +49,4 @@ const useUserSelfTenantPermissions = (
});
};

export default useUserSelfTenantPermissions;
export default useUserTenantPermissions;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from 'react-query';

import permissions from 'fixtures/permissions';
import useUserSelfTenantPermissions from './useUserSelfTenantPermissions';
import useUserTenantPermissions from './useUserTenantPermissions';
import useOkapiKy from '../useOkapiKy';

jest.mock('../useOkapiKy');
Expand All @@ -31,7 +31,7 @@ const response = {
permissions: { permissions },
};

describe('useUserSelfTenantPermissions', () => {
describe('useUserTenantPermissions', () => {
const getMock = jest.fn(() => ({
json: () => Promise.resolve(response),
}));
Expand All @@ -55,7 +55,7 @@ describe('useUserSelfTenantPermissions', () => {
const options = {
tenantId: 'tenantId',
};
const { result } = renderHook(() => useUserSelfTenantPermissions(options), { wrapper });
const { result } = renderHook(() => useUserTenantPermissions(options), { wrapper });

await waitFor(() => !result.current.isLoading);

Expand Down

0 comments on commit 1ba21b4

Please sign in to comment.