bmc-toolbox/bmclib

concern - `UserDelete` method called on only existing BMC user

jacobweinstock opened this issue · 0 comments

With this interface method below, we could potentially lock ourselves out of a BMC by removing all users. If the user given is the only user in the BMC, we might not want to delete it.

UserDelete(ctx context.Context, user string) (ok bool, err error)

We should probably add some comments to the method so that implementors know they should check if the user is the only user left before deleting. We could also maybe add a parameter like force bool to delete the user regardless.