From 8a02121767e696dac0727a9a064d6d504bc34787 Mon Sep 17 00:00:00 2001 From: Martin Kraft Date: Mon, 9 Jul 2018 06:48:43 -0400 Subject: MM-11110: Fixes CLI error message. (#9062) --- cmd/mattermost/commands/channel.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/mattermost') diff --git a/cmd/mattermost/commands/channel.go b/cmd/mattermost/commands/channel.go index 80740d85e..478466a34 100644 --- a/cmd/mattermost/commands/channel.go +++ b/cmd/mattermost/commands/channel.go @@ -339,7 +339,7 @@ func moveChannelsCmdF(command *cobra.Command, args []string) error { channels := getChannelsFromChannelArgs(a, args[1:]) for i, channel := range channels { if channel == nil { - CommandPrintErrorln("Unable to find channel '" + args[i] + "'") + CommandPrintErrorln("Unable to find channel '" + args[i+1] + "'") continue } originTeamID := channel.TeamId -- cgit v1.2.3-1-g7c22 From 74e5d8ae66186a82e8afdd845a108d6a662751d7 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 10 Jul 2018 01:54:25 -0700 Subject: MM-11120 Adding setting to disable email invitations and rate limiting. (#9063) * Adding setting to disable email invitations. * Adding a setting and rate limiting for email invite sending. * Modifying email rate limit to 20/user/hour * Adding EnableEmailInvitations to client side config and command. --- cmd/mattermost/commands/user.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd/mattermost') diff --git a/cmd/mattermost/commands/user.go b/cmd/mattermost/commands/user.go index 373fe7463..b3b43c076 100644 --- a/cmd/mattermost/commands/user.go +++ b/cmd/mattermost/commands/user.go @@ -384,7 +384,11 @@ func inviteUser(a *app.App, email string, team *model.Team, teamArg string) erro return fmt.Errorf("Can't find team '%v'", teamArg) } - a.SendInviteEmails(team, "Administrator", invites, *a.Config().ServiceSettings.SiteURL) + if !*a.Config().ServiceSettings.EnableEmailInvitations { + return fmt.Errorf("Email invites are disabled.") + } + + a.SendInviteEmails(team, "Administrator", "Mattermost CLI "+model.NewId(), invites, *a.Config().ServiceSettings.SiteURL) CommandPrettyPrintln("Invites may or may not have been sent.") return nil -- cgit v1.2.3-1-g7c22