From 148794330ca5cae22e4d17fd201c1007c469f578 Mon Sep 17 00:00:00 2001 From: aidynoJ <121284650+aidynoJ@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:31:30 +0500 Subject: [PATCH 1/4] UIU-3282: add capability to access users-keycloak delete method (#2810) Refs UIU-3282. --- CHANGELOG.md | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e97da646..325d26e1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279. * Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249. * Show all patron notice print jobs (not just ten random ones), in correct order. Fixes UIU-3269. +* Add permission to access users-keycloak delete method. Refs UIU-3282. ## [11.0.5](https://github.com/folio-org/ui-users/tree/v11.0.5) (2024-11-20) [Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.3...v11.0.5) diff --git a/package.json b/package.json index 708685baf..8aca88246 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,8 @@ "displayName": "Users: Can delete user profile if user does not have any open transactions", "description": "Delete user when user does not have any open transactions", "subPermissions": [ - "users-bl.item.delete" + "users-bl.item.delete", + "users-keycloak.item.delete" ], "visible": true }, From 23ca206c159d91b37a39e7844323e3122406ceaf Mon Sep 17 00:00:00 2001 From: aidynoJ <121284650+aidynoJ@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:04:53 +0500 Subject: [PATCH 2/4] UIU-3273: check if userId is present in withUserRoles HOC (#2816) Refs UIU-3273. --- CHANGELOG.md | 9 +++++++++ src/components/Wrappers/withUserRoles.js | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 325d26e1b..7f564480f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ * Add missed `circulation-storage.loans.item.get`, `inventory.items.item.get` permissions. Refs UIU-3291. +## [11.1.0] In progress +* `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279. +* Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249. +* Add permission to access users-keycloak delete method. Refs UIU-3282. +* Fix issue with `Proxy borrower` field value. Refs UIU-3290. +* Check if userId is present in withUserRoles HOC. Refs UIU-3273. + + + ## [11.0.7](https://github.com/folio-org/ui-users/tree/v11.0.7) (2024-11-30) [Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.6...v11.0.7) diff --git a/src/components/Wrappers/withUserRoles.js b/src/components/Wrappers/withUserRoles.js index ae8bbb595..a25317728 100644 --- a/src/components/Wrappers/withUserRoles.js +++ b/src/components/Wrappers/withUserRoles.js @@ -45,7 +45,7 @@ const withUserRoles = (WrappedComponent) => (props) => { useEffect(() => { // eslint-disable-next-line react/prop-types - if (props.stripes.hasInterface('users-keycloak') && !isAllRolesDataLoading) { + if (props.stripes.hasInterface('users-keycloak') && !isAllRolesDataLoading && !!userId) { api.get( 'roles/users', { searchParams }, ) From 5c25c4d9edcd4d18da713a425f67f25355aa29b0 Mon Sep 17 00:00:00 2001 From: aidynoJ <121284650+aidynoJ@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:57:24 +0500 Subject: [PATCH 3/4] UIU-3294: Provide correct role-assignment permissions for endpoints within withUserRoles HOC used with UserEdit. (#2821) Refs UIU-3294. --- CHANGELOG.md | 3 ++- package.json | 9 +++++++-- src/hooks/useAllRolesData/useAllRolesData.js | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f564480f..d32121563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,8 @@ * Add permission to access users-keycloak delete method. Refs UIU-3282. * Fix issue with `Proxy borrower` field value. Refs UIU-3290. * Check if userId is present in withUserRoles HOC. Refs UIU-3273. - +* Add missed `circulation-storage.loans.item.get`, `inventory.items.item.get` permissions. Refs UIU-3291. +* Add missed permissions for endpoints used in withUserRoles HOC. UIU-3294. ## [11.0.7](https://github.com/folio-org/ui-users/tree/v11.0.7) (2024-11-30) diff --git a/package.json b/package.json index 8aca88246..fa1996616 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,10 @@ "user-settings.custom-fields.item.stats.get", "departments.collection.get", "departments.item.get", - "users.configurations.item.get" + "users.configurations.item.get", + "roles.users.collection.get", + "users-keycloak.auth-users.item.get", + "roles.collection.get" ], "visible": true }, @@ -102,7 +105,9 @@ "tags.collection.get", "tags.item.post", "circulation-storage.request-preferences.item.post", - "circulation-storage.request-preferences.item.put" + "circulation-storage.request-preferences.item.put", + "roles.users.item.put", + "users-keycloak.auth-users.item.post" ], "visible": true }, diff --git a/src/hooks/useAllRolesData/useAllRolesData.js b/src/hooks/useAllRolesData/useAllRolesData.js index 53d75d918..542a07077 100644 --- a/src/hooks/useAllRolesData/useAllRolesData.js +++ b/src/hooks/useAllRolesData/useAllRolesData.js @@ -20,8 +20,8 @@ function useAllRolesData() { const [namespace] = useNamespace(); const { data, isLoading, isSuccess } = useQuery([namespace, 'user-roles'], () => { - return stripes.hasInterface('roles') && ky.get(`roles?limit=${stripes.config.maxUnpagedResourceCount}&query=cql.allRecords=1 sortby name`).json(); - }); + return ky.get(`roles?limit=${stripes.config.maxUnpagedResourceCount}&query=cql.allRecords=1 sortby name`).json(); + }, { enabled: stripes.hasInterface('roles') }); const allRolesMapStructure = useMemo(() => { const rolesMap = new Map(); From 1c225ad775e33f89db12b038fe106cff87e5fd8c Mon Sep 17 00:00:00 2001 From: Priyanka Terala Date: Fri, 13 Dec 2024 17:39:51 +0530 Subject: [PATCH 4/4] Release v11.0.9 --- CHANGELOG.md | 17 +++++++---------- package.json | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d32121563..6d644bbf9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,19 +1,17 @@ # Change history for ui-users -## [11.0.8](https://github.com/folio-org/ui-users/tree/v11.0.8) (2024-12-10) -[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.7...v11.0.8) - -* Add missed `circulation-storage.loans.item.get`, `inventory.items.item.get` permissions. Refs UIU-3291. +## [11.0.9](https://github.com/folio-org/ui-users/tree/v11.0.9) (2024-12-13) +[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.8...v11.0.9) -## [11.1.0] In progress -* `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279. -* Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249. * Add permission to access users-keycloak delete method. Refs UIU-3282. -* Fix issue with `Proxy borrower` field value. Refs UIU-3290. * Check if userId is present in withUserRoles HOC. Refs UIU-3273. -* Add missed `circulation-storage.loans.item.get`, `inventory.items.item.get` permissions. Refs UIU-3291. * Add missed permissions for endpoints used in withUserRoles HOC. UIU-3294. +## [11.0.8](https://github.com/folio-org/ui-users/tree/v11.0.8) (2024-12-10) +[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.7...v11.0.8) + +* Add missed `circulation-storage.loans.item.get`, `inventory.items.item.get` permissions. Refs UIU-3291. + ## [11.0.7](https://github.com/folio-org/ui-users/tree/v11.0.7) (2024-11-30) [Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.6...v11.0.7) @@ -27,7 +25,6 @@ * `useUserTenantRoles` supplies `tenantId` in all its queries. Refs UIU-3279. * Leverage API supported sorting of columns on pre-registrations records list. Refs UIU-3249. * Show all patron notice print jobs (not just ten random ones), in correct order. Fixes UIU-3269. -* Add permission to access users-keycloak delete method. Refs UIU-3282. ## [11.0.5](https://github.com/folio-org/ui-users/tree/v11.0.5) (2024-11-20) [Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.3...v11.0.5) diff --git a/package.json b/package.json index fa1996616..0985a1e43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@folio/users", - "version": "11.0.8", + "version": "11.0.9", "description": "User management", "repository": "folio-org/ui-users", "publishConfig": {