From 38b2c2454118e2b708bfa61cf0d584d2bda15b01 Mon Sep 17 00:00:00 2001 From: devinleighsmith <41091511+devinleighsmith@users.noreply.github.com> Date: Tue, 28 Jun 2022 10:54:56 -0700 Subject: [PATCH] cherry pick system admin fix into master branch (#1666) * get system admin role for user management, in addition to other public roles. (#1622) * bump hotfix version. --- backend/api/Pims.Api.csproj | 2 +- frontend/package.json | 2 +- frontend/src/features/admin/edit-user/EditUserForm.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/api/Pims.Api.csproj b/backend/api/Pims.Api.csproj index a799b43f41..f8d985e81a 100644 --- a/backend/api/Pims.Api.csproj +++ b/backend/api/Pims.Api.csproj @@ -2,7 +2,7 @@ 0ef6255f-9ea0-49ec-8c65-c172304b4926 - 1.1.0-29.32 + 1.1.1-29.32 1.1.0.29 true 16BC0468-78F6-4C91-87DA-7403C919E646 diff --git a/frontend/package.json b/frontend/package.json index bcb17b7283..0d59c0d7ce 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "1.1.0-29.32", + "version": "1.1.1-29.32", "private": true, "dependencies": { "@bcgov/bc-sans": "1.0.1", diff --git a/frontend/src/features/admin/edit-user/EditUserForm.tsx b/frontend/src/features/admin/edit-user/EditUserForm.tsx index f95fcbd8fb..6e082c92ac 100644 --- a/frontend/src/features/admin/edit-user/EditUserForm.tsx +++ b/frontend/src/features/admin/edit-user/EditUserForm.tsx @@ -28,8 +28,8 @@ const EditUserForm: React.FunctionComponent = ({ formUser, onCancel, }) => { - const { getPublicByType } = useLookupCodeHelpers(); - const roles = getPublicByType(API.ROLE_TYPES); + const { getPublicByType, getByType } = useLookupCodeHelpers(); + const roles = getByType(API.ROLE_TYPES); const regions = getPublicByType(API.REGION_TYPES).filter( region => region.name !== 'Cannot determine', );