Skip to content

Commit

Permalink
Release v11.0.9 (#2824)
Browse files Browse the repository at this point in the history
* UIU-3282: add capability to access users-keycloak delete method (#2810)

Refs UIU-3282.

* UIU-3273: check if userId is present in withUserRoles HOC (#2816)

Refs UIU-3273.

* UIU-3294: Provide correct role-assignment permissions for endpoints within withUserRoles HOC used with UserEdit.  (#2821)

Refs UIU-3294.

* Release v11.0.9

---------

Co-authored-by: aidynoJ <[email protected]>
  • Loading branch information
Terala-Priyanka and aidynoJ authored Dec 16, 2024
1 parent 0fa06d4 commit d6b2088
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Change history for ui-users

## [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)

* Add permission to access users-keycloak delete method. Refs UIU-3282.
* Check if userId is present in withUserRoles HOC. Refs UIU-3273.
* 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)

Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folio/users",
"version": "11.0.8",
"version": "11.0.9",
"description": "User management",
"repository": "folio-org/ui-users",
"publishConfig": {
Expand Down Expand Up @@ -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
},
Expand All @@ -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
},
Expand All @@ -111,7 +116,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
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Wrappers/withUserRoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
)
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useAllRolesData/useAllRolesData.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d6b2088

Please sign in to comment.