From 10b6225e074834f634e976ecc4d126dce3039dcc Mon Sep 17 00:00:00 2001 From: Radoslav Dimitrov Date: Thu, 6 Jun 2024 21:45:10 +0300 Subject: [PATCH] Hide the auth invite commands until it's fully implemented in the server Signed-off-by: Radoslav Dimitrov --- cmd/cli/app/auth/invite/invite.go | 5 +++-- cmd/cli/app/auth/invite/invite_accept.go | 11 ++++++----- cmd/cli/app/auth/invite/invite_decline.go | 11 ++++++----- cmd/cli/app/auth/invite/invite_list.go | 9 +++++---- 4 files changed, 20 insertions(+), 16 deletions(-) diff --git a/cmd/cli/app/auth/invite/invite.go b/cmd/cli/app/auth/invite/invite.go index 63e934bdc2..c521ca09f5 100644 --- a/cmd/cli/app/auth/invite/invite.go +++ b/cmd/cli/app/auth/invite/invite.go @@ -24,8 +24,9 @@ import ( // inviteCmd represents the offline-token set of sub-commands var inviteCmd = &cobra.Command{ - Use: "invite", - Short: "Manage user invitations", + Hidden: true, // TODO: This hides the command, remove it once it's implemented + Use: "invite", + Short: "Manage user invitations", Long: `The minder auth invite command lets you manage user invitations for the minder control plane.`, RunE: func(cmd *cobra.Command, _ []string) error { diff --git a/cmd/cli/app/auth/invite/invite_accept.go b/cmd/cli/app/auth/invite/invite_accept.go index 2c2b3faa11..1ac6112112 100644 --- a/cmd/cli/app/auth/invite/invite_accept.go +++ b/cmd/cli/app/auth/invite/invite_accept.go @@ -28,11 +28,12 @@ import ( // inviteAcceptCmd represents the accept command var inviteAcceptCmd = &cobra.Command{ - Use: "accept", - Short: "Accept a pending invitation", - Long: `Accept a pending invitation for the current minder user`, - RunE: cli.GRPCClientWrapRunE(inviteAcceptCommand), - Args: cobra.ExactArgs(1), + Hidden: true, // TODO: This hides the command, remove it once it's implemented + Use: "accept", + Short: "Accept a pending invitation", + Long: `Accept a pending invitation for the current minder user`, + RunE: cli.GRPCClientWrapRunE(inviteAcceptCommand), + Args: cobra.ExactArgs(1), } // inviteAcceptCommand is the whoami subcommand diff --git a/cmd/cli/app/auth/invite/invite_decline.go b/cmd/cli/app/auth/invite/invite_decline.go index 564f8260ce..e1052df067 100644 --- a/cmd/cli/app/auth/invite/invite_decline.go +++ b/cmd/cli/app/auth/invite/invite_decline.go @@ -28,11 +28,12 @@ import ( // inviteDeclineCmd represents the decline command var inviteDeclineCmd = &cobra.Command{ - Use: "decline", - Short: "Declines a pending invitation", - Long: `Declines a pending invitation for the current minder user`, - RunE: cli.GRPCClientWrapRunE(inviteDeclineCommand), - Args: cobra.ExactArgs(1), + Hidden: true, // TODO: This hides the command, remove it once it's implemented + Use: "decline", + Short: "Declines a pending invitation", + Long: `Declines a pending invitation for the current minder user`, + RunE: cli.GRPCClientWrapRunE(inviteDeclineCommand), + Args: cobra.ExactArgs(1), } // inviteAcceptCommand is the whoami subcommand diff --git a/cmd/cli/app/auth/invite/invite_list.go b/cmd/cli/app/auth/invite/invite_list.go index 340f9d059d..dd2fd6a67c 100644 --- a/cmd/cli/app/auth/invite/invite_list.go +++ b/cmd/cli/app/auth/invite/invite_list.go @@ -36,10 +36,11 @@ import ( // inviteListCmd represents the list command var inviteListCmd = &cobra.Command{ - Use: "list", - Short: "List pending invitations", - Long: `List shows all pending invitations for the current minder user`, - RunE: cli.GRPCClientWrapRunE(inviteListCommand), + Hidden: true, // TODO: This hides the command, remove it once it's implemented + Use: "list", + Short: "List pending invitations", + Long: `List shows all pending invitations for the current minder user`, + RunE: cli.GRPCClientWrapRunE(inviteListCommand), } // inviteListCommand is the whoami subcommand