From daa3ff3d19315ef87c223b5fe5898b64b7b5010a Mon Sep 17 00:00:00 2001 From: Nick Phura Date: Tue, 10 May 2022 11:53:25 -0700 Subject: [PATCH] BHBC-1700: Move to Test (#777) * Bugfix: Incorrect identity source enum (#776) - account for the fact that openapi enums are case sensitive --- .../{administrativeActivityId}/approve.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/api/src/paths/administrative-activity/system-access/{administrativeActivityId}/approve.ts b/api/src/paths/administrative-activity/system-access/{administrativeActivityId}/approve.ts index 50bf2cb306..ccb8282962 100644 --- a/api/src/paths/administrative-activity/system-access/{administrativeActivityId}/approve.ts +++ b/api/src/paths/administrative-activity/system-access/{administrativeActivityId}/approve.ts @@ -28,15 +28,21 @@ export const PUT: Operation = [ approveAccessRequest() ]; -const AllUserIdentitySources = Array.from( +const UniqueUserIdentitySources = Array.from( new Set([ - ...SYSTEM_IDENTITY_SOURCE.IDIR, - ...SYSTEM_IDENTITY_SOURCE.BCEID, + SYSTEM_IDENTITY_SOURCE.IDIR, + SYSTEM_IDENTITY_SOURCE.BCEID, ...EXTERNAL_IDIR_IDENTITY_SOURCES, ...EXTERNAL_BCEID_IDENTITY_SOURCES ]) ); +// Contains both uppercase and lowercase versions of the identity sources +const AllUserIdentitySources = [ + ...UniqueUserIdentitySources, + ...UniqueUserIdentitySources.map((item) => item.toLowerCase()) +]; + PUT.apiDoc = { description: "Update a user's system access request and add any specified system roles to the user.", tags: ['user'],