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

Conversation

kmaranionjc
Copy link
Contributor

@kmaranionjc kmaranionjc commented Dec 12, 2024

Issues

  • Cut-4468 - Cut-4468-cascade-manager-remove-jc-user

What does this solve?

Adds functionality for cascading manager with Remove-JCUser

Is there anything particularly tricky?

n/a

How should this be tested?

Remove-JCUser -UserId id

  • Delete a user/manager. If the user is a manager, there will be prompts to cascade the manager of the users
    image
  • Delete manager1 that is managed by manager2. Instead of cascading the users manager to manager2. Enter a different user id to manage the managed users.
    image
  • Delete manager1 that is managed by manager2. Cascade the manager2 to managed users
    image

Remove-JCUser -UserId id -force

  • Remove a user(manager) with force param. This should set its managed users manager to null

Remove-JCUser -UserId id -force -CascadeManager user -CascadeManagerUser testUser

  • Should throw an error. CascadeManager and force is not allowed

Remove-JCUser -UserId id -CascadeManager User -CascadeManagerUser Username/Id
image
image

  • Remove a user (manager). Managed users manager should be the given Cascade Manager

Remove-JCUser -UserId id -CascadeManager auto

  • Setup manager1 that is managed by manager2. This command should automatically cascade the manager of the managed users of manager1 to manager2 and remove/delete manager1

Remove-JCUser -UserId id -CascadeManager null

  • Remove a user/manager. It's managed users should have no manager after removal.

Screenshots

@kmaranionjc kmaranionjc added minor minor version release PowerShell Module Release for JumpCloud PowerShell Module labels Dec 12, 2024
@kmaranionjc kmaranionjc self-assigned this Dec 12, 2024
@kmaranionjc kmaranionjc requested a review from a team as a code owner December 12, 2024 22:39
Copy link
Contributor

@jworkmanjc jworkmanjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's chat about this as a team, I think there are a few changes that have to be made, there are a few changes that could be made to make this more readable.

PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
PowerShell/JumpCloud Module/Public/Users/Remove-JCUser.ps1 Outdated Show resolved Hide resolved
Copy link
Contributor

@gweinjc gweinjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we need to change the branch to be merged into CUT-4394_JCDeviceFromCSV instead of master if we intend to release both features

Also when testing, there isn't any feedback whether or not the manager was actually cascaded or not, some kind of output might be beneficial to customers showcasing that the new manager assignment took place

Copy link
Contributor

@jworkmanjc jworkmanjc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few wording updates in the examples really, otherwise I think this is okay

@kmaranionjc kmaranionjc changed the base branch from master to CUT-4394_JCDeviceFromCSV December 17, 2024 20:57
@kmaranionjc kmaranionjc merged commit 3286ca6 into CUT-4394_JCDeviceFromCSV Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor minor version release PowerShell Module Release for JumpCloud PowerShell Module
Development

Successfully merging this pull request may close these issues.

5 participants