diff --git a/pkg/cmd/user.go b/pkg/cmd/user.go index 0992d299a..d04a661f3 100644 --- a/pkg/cmd/user.go +++ b/pkg/cmd/user.go @@ -29,7 +29,7 @@ import ( ) func init() { - userCmd.AddCommand(userListCmd) + userCmd.AddCommand(userListCmd, userCreateCmd, userDeleteCmd, userUpdateCmd, userResetPasswordCmd, userChangeEnabledCmd) rootCmd.AddCommand(userCmd) } @@ -40,7 +40,7 @@ var userCmd = &cobra.Command{ var userListCmd = &cobra.Command{ Use: "list", - Short: "Shows a list of all users on this instance.", + Short: "Shows a list of all users.", PreRun: func(cmd *cobra.Command, args []string) { initialize.FullInit() }, @@ -74,3 +74,58 @@ var userListCmd = &cobra.Command{ table.Render() }, } + +var userCreateCmd = &cobra.Command{ + Use: "create", + Short: "Create a new user.", + PreRun: func(cmd *cobra.Command, args []string) { + initialize.FullInit() + }, + Run: func(cmd *cobra.Command, args []string) { + + }, +} + +var userUpdateCmd = &cobra.Command{ + Use: "update", + Short: "Update an existing user.", + PreRun: func(cmd *cobra.Command, args []string) { + initialize.FullInit() + }, + Run: func(cmd *cobra.Command, args []string) { + + }, +} + +var userDeleteCmd = &cobra.Command{ + Use: "delete", + Short: "Delete a user.", + PreRun: func(cmd *cobra.Command, args []string) { + initialize.FullInit() + }, + Run: func(cmd *cobra.Command, args []string) { + + }, +} + +var userResetPasswordCmd = &cobra.Command{ + Use: "reset-password", + Short: "Reset a users password, either through mailing them a reset link or directly.", + PreRun: func(cmd *cobra.Command, args []string) { + initialize.FullInit() + }, + Run: func(cmd *cobra.Command, args []string) { + // need flags + }, +} + +var userChangeEnabledCmd = &cobra.Command{ + Use: "toggle-status", + Short: "Enable or disable a user.", + PreRun: func(cmd *cobra.Command, args []string) { + initialize.FullInit() + }, + Run: func(cmd *cobra.Command, args []string) { + // Flag to either enable or disable + }, +}