Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut-4468-cascade-manager-remove-jc-user #631

Merged
Merged
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
34d9129
change to windows uninstaller for more robustness
mmihevcmm Dec 2, 2024
bb9bcc3
suppressing error when can't find app to uninstall
mmihevcmm Dec 4, 2024
7eda939
Merge pull request #624 from TheJumpCloud/grab_uninstall_windows_fixes
mmihevcmm Dec 5, 2024
f24a76b
Update Mac - Install Chrome DMG.md
kkirklandjc Dec 9, 2024
a67118e
Merge pull request #628 from TheJumpCloud/kkirklandjc-patch-2
kkirklandjc Dec 9, 2024
685bf9d
cascade manager
kmaranionjc Dec 10, 2024
85154ed
cascade manager param added
kmaranionjc Dec 11, 2024
da7dd3d
additional checks
kmaranionjc Dec 12, 2024
3210ec1
docs
kmaranionjc Dec 12, 2024
ae30d68
tests
kmaranionjc Dec 12, 2024
018614b
test
kmaranionjc Dec 12, 2024
d579298
test
kmaranionjc Dec 13, 2024
73f8655
manager
kmaranionjc Dec 13, 2024
1a13890
fix dynamicparam
kmaranionjc Dec 13, 2024
d1b1251
skip commandresults
kmaranionjc Dec 13, 2024
4d028f5
mock
kmaranionjc Dec 13, 2024
640b343
mock
kmaranionjc Dec 13, 2024
c55130f
test
kmaranionjc Dec 14, 2024
b943209
delete jcuser test
kmaranionjc Dec 14, 2024
8308843
test
kmaranionjc Dec 14, 2024
0024c11
move invoke + tests
kmaranionjc Dec 16, 2024
7f8690e
test
kmaranionjc Dec 16, 2024
427fe3c
test
kmaranionjc Dec 16, 2024
b42fb40
test
kmaranionjc Dec 16, 2024
6d0e919
test
kmaranionjc Dec 16, 2024
37931fe
test cascade
kmaranionjc Dec 16, 2024
f2787ce
test
kmaranionjc Dec 16, 2024
08f13e8
test doc
kmaranionjc Dec 16, 2024
ee94a00
Update PowerShell/JumpCloud Module/Docs/Remove-JCUser.md
kmaranionjc Dec 17, 2024
65cfcf4
Update PowerShell/JumpCloud Module/Docs/Remove-JCUser.md
kmaranionjc Dec 17, 2024
6eae8ef
Update PowerShell/JumpCloud Module/Docs/Remove-JCUser.md
kmaranionjc Dec 17, 2024
60f667b
Update PowerShell/JumpCloud Module/Tests/Public/Users/Remove-JCUser.T…
kmaranionjc Dec 17, 2024
cac302d
Update PowerShell/JumpCloud Module/Docs/Remove-JCUser.md
kmaranionjc Dec 17, 2024
c823b41
Update PowerShell/JumpCloud Module/Docs/Remove-JCUser.md
kmaranionjc Dec 17, 2024
67501fa
doc
kmaranionjc Dec 17, 2024
d86b6e2
Merge branch 'CUT-4394_JCDeviceFromCSV' into CUT-4468-Cascade-Manager…
kmaranionjc Dec 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test cascade
kmaranionjc committed Dec 16, 2024
commit 37931fe4fd6da1038da788873eed1a80dd04ead3
Original file line number Diff line number Diff line change
@@ -133,27 +133,4 @@ Describe -Tag:('JCUser') "Remove-JCUser 2.16.0" {
Remove-JCUser -UserID $ManagerUser._id -force
Remove-JCUser -UserID $NewUser._id -force
}

It "Remove JumpCloud Manager1 that is also managed by a Manager2. Cascade managed users manager to Manager2" {
$ManagerUser = New-RandomUser "PesterTest$(Get-Date -Format MM-dd-yyyy)" | New-JCUser
$ManagerUser2 = New-RandomUser "PesterTest$(Get-Date -Format MM-dd-yyyy)" | New-JCUser
$NewUser = New-RandomUser -Domain "delUser.$(New-RandomString -NumberOfChars 5)" | New-JCUser

# Set the manager for user
Set-JCUser -UserID $ManagerUser._id -manager $ManagerUser2._id # ManagerUser2 is the manager of ManagerUser
Set-JCUser -UserID $NewUser._id -manager $ManagerUser._id

Mock -CommandName Read-Host -MockWith { return 'y' }
# Remove the manager and set the new manager
$RemoveUser = Remove-JCUser -UserID $ManagerUser._id # Remove ManagerUser and should cascade to ManagerUser2. Prompts should be auto answered with 'Y'

# The manager should be removed and the new manager should be set
$RemoveUser.Results | Should -Be 'Deleted'
# The new manager should be set to ManagerUser2
$manager = Get-JCUser -UserID $NewUser._id | Select-Object -ExpandProperty manager
$manager | Should -Be $ManagerUser2._id
# Clean up
Remove-JCUser -UserID $ManagerUser2._id -force
Remove-JCUser -UserID $NewUser._id -force
}
}