Skip to content

Commit d26333a

Browse files
CLOUDP-120842: [AtlasCLI] users command show the delete command which is available only on OM (#1146)
1 parent 9d6b4d5 commit d26333a

File tree

3 files changed

+5
-62
lines changed

3 files changed

+5
-62
lines changed

docs/atlascli/command/atlas-users-delete.txt

Lines changed: 0 additions & 59 deletions
This file was deleted.

docs/atlascli/command/atlas-users.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,13 @@ Inherited Options
5151
Related Commands
5252
----------------
5353

54-
* :ref:`atlas-users-delete` - Delete an Ops Manager user.
5554
* :ref:`atlas-users-describe` - Get a user by username or id.
5655
* :ref:`atlas-users-invite` - Invite a user.
5756

5857

5958
.. toctree::
6059
:titlesonly:
6160

62-
delete </command/atlas-users-delete>
6361
describe </command/atlas-users-describe>
6462
invite </command/atlas-users-invite>
6563

internal/cli/iam/users/users.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ package users
1616

1717
import (
1818
"github.com/mongodb/mongocli/internal/cli"
19+
"github.com/mongodb/mongocli/internal/config"
1920
"github.com/spf13/cobra"
2021
)
2122

@@ -31,8 +32,11 @@ func Builder() *cobra.Command {
3132
cmd.AddCommand(
3233
InviteBuilder(),
3334
DescribeBuilder(),
34-
DeleteBuilder(),
3535
)
3636

37+
if config.ToolName == config.MongoCLI {
38+
cmd.AddCommand(DeleteBuilder())
39+
}
40+
3741
return cmd
3842
}

0 commit comments

Comments
 (0)