Skip to content

Commit

Permalink
Always said disable even if delete was chosen as the expireaction
Browse files Browse the repository at this point in the history
  • Loading branch information
kris6673 committed Jul 3, 2024
1 parent b8568d0 commit 4c46034
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Function Invoke-ExecJITAdmin {

$DisableTaskBody = @{
TenantFilter = $Request.Body.TenantFilter
Name = "JIT Admin (disable): $Username"
Name = "JIT Admin ($($Request.Body.ExpireAction)): $Username"
Command = @{
value = 'Set-CIPPUserJITAdmin'
label = 'Set-CIPPUserJITAdmin'
Expand All @@ -177,7 +177,7 @@ Function Invoke-ExecJITAdmin {
ScheduledTime = $Request.Body.EndDate
}
Add-CIPPScheduledTask -Task $DisableTaskBody -hidden $false
$Results.Add("Scheduling JIT Admin disable task for $Username")
$Results.Add("Scheduling JIT Admin $($Request.Body.ExpireAction) task for $Username")
$Body = @{
Results = @($Results)
}
Expand Down

0 comments on commit 4c46034

Please sign in to comment.