From fd878bd50c1c36f90962776ebb9626d016239540 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 15 Sep 2017 17:40:37 +0100 Subject: PLT-7539: Remove redundant license checks from CLI commands. (#7451) --- cmd/platform/channel.go | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'cmd/platform/channel.go') diff --git a/cmd/platform/channel.go b/cmd/platform/channel.go index 8f8e8e194..b1fededb6 100644 --- a/cmd/platform/channel.go +++ b/cmd/platform/channel.go @@ -8,7 +8,6 @@ import ( "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" - "github.com/mattermost/mattermost-server/utils" "github.com/spf13/cobra" ) @@ -131,10 +130,6 @@ func createChannelCmdF(cmd *cobra.Command, args []string) error { return err } - if !utils.IsLicensed() { - return errors.New(utils.T("cli.license.critical")) - } - name, errn := cmd.Flags().GetString("name") if errn != nil || name == "" { return errors.New("Name is required") @@ -184,10 +179,6 @@ func removeChannelUsersCmdF(cmd *cobra.Command, args []string) error { return err } - if !utils.IsLicensed() { - return errors.New(utils.T("cli.license.critical")) - } - if len(args) < 2 { return errors.New("Not enough arguments.") } @@ -221,10 +212,6 @@ func addChannelUsersCmdF(cmd *cobra.Command, args []string) error { return err } - if !utils.IsLicensed() { - return errors.New(utils.T("cli.license.critical")) - } - if len(args) < 2 { return errors.New("Not enough arguments.") } @@ -389,10 +376,6 @@ func listChannelsCmdF(cmd *cobra.Command, args []string) error { return err } - if !utils.IsLicensed() { - return errors.New(utils.T("cli.license.critical")) - } - if len(args) < 1 { return errors.New("Enter at least one team.") } @@ -427,10 +410,6 @@ func restoreChannelsCmdF(cmd *cobra.Command, args []string) error { return err } - if !utils.IsLicensed() { - return errors.New(utils.T("cli.license.critical")) - } - if len(args) < 1 { return errors.New("Enter at least one channel.") } @@ -455,10 +434,6 @@ func modifyChannelCmdF(cmd *cobra.Command, args []string) error { return err } - if !utils.IsLicensed() { - return errors.New(utils.T("cli.license.critical")) - } - if len(args) != 1 { return errors.New("Enter at one channel to modify.") } -- cgit v1.2.3-1-g7c22