From 5d0043457690998792835d58beb0126f0e54b0f7 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 19 Jun 2024 21:59:37 -0400 Subject: [PATCH 1/2] JIT tweaks --- .../administration/DeployJITAdmin.jsx | 38 ++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/src/views/identity/administration/DeployJITAdmin.jsx b/src/views/identity/administration/DeployJITAdmin.jsx index b87ca67dd8f3..aa6e64b80e74 100644 --- a/src/views/identity/administration/DeployJITAdmin.jsx +++ b/src/views/identity/administration/DeployJITAdmin.jsx @@ -1,7 +1,7 @@ import React, { useState } from 'react' import { CButton, CCallout, CCol, CForm, CRow, CSpinner, CTooltip } from '@coreui/react' import { useSelector } from 'react-redux' -import { Field, Form } from 'react-final-form' +import { Field, Form, FormSpy } from 'react-final-form' import { Condition, RFFCFormInput, @@ -45,6 +45,7 @@ const DeployJITAdmin = () => { useraction: values.useraction, AdminRoles: values.AdminRoles?.map((role) => role.value), StartDate: startTime, + UseTAP: values.useTap, EndDate: endTime, ExpireAction: values.expireAction.value, PostExecution: { @@ -137,6 +138,25 @@ const DeployJITAdmin = () => { name="UserId" isLoading={usersIsFetching} /> + + {({ values }) => { + users.map((user, key) => { + if ( + user.id === values.UserId?.value && + user.accountEnabled === false + ) { + return ( + + + + ) + } + }) + }} + @@ -195,6 +215,15 @@ const DeployJITAdmin = () => { /> + + + +
+ +
+
+
+
@@ -258,6 +287,13 @@ const DeployJITAdmin = () => { cell: cellGenericFormatter(), exportSelector: 'userPrincipalName', }, + { + name: 'Account Enabled', + selector: (row) => row['accountEnabled'], + sortable: true, + cell: cellGenericFormatter(), + exportSelector: 'accountEnabled', + }, { name: 'JIT Enabled', selector: (row) => row['jitAdminEnabled'], From 060f55503e85f9c94fe3a88cf034d4013f98219e Mon Sep 17 00:00:00 2001 From: John Duprey Date: Wed, 19 Jun 2024 23:30:19 -0400 Subject: [PATCH 2/2] Update DeployJITAdmin.jsx --- src/views/identity/administration/DeployJITAdmin.jsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/views/identity/administration/DeployJITAdmin.jsx b/src/views/identity/administration/DeployJITAdmin.jsx index aa6e64b80e74..4c572ec4250b 100644 --- a/src/views/identity/administration/DeployJITAdmin.jsx +++ b/src/views/identity/administration/DeployJITAdmin.jsx @@ -140,17 +140,15 @@ const DeployJITAdmin = () => { /> {({ values }) => { - users.map((user, key) => { + return users.map((user, key) => { if ( - user.id === values.UserId?.value && + user.id === values?.UserId?.value && user.accountEnabled === false ) { return ( - - + + This user is currently disabled, they will automatically be + enabled when JIT is executed. ) }