From d85dff81a82a09760182705b5e81b32ffbae778a Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Fri, 1 Mar 2019 20:11:38 +0800 Subject: [PATCH] skip tutorial steps for sysadmin, user-1 and user-2 from generated sample data (#10387) --- cmd/mattermost/commands/sampledata.go | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/cmd/mattermost/commands/sampledata.go b/cmd/mattermost/commands/sampledata.go index 9b9035d4fe..25ea4591e0 100644 --- a/cmd/mattermost/commands/sampledata.go +++ b/cmd/mattermost/commands/sampledata.go @@ -399,15 +399,18 @@ func createUser(idx int, teamMemberships int, channelMemberships int, teamsAndCh nickname = fake.Company() } - // Half of users skip tutorial + // sysadmin, user-1 and user-2 users skip tutorial steps + // Other half of users also skip tutorial steps tutorialStep := "999" - switch rand.Intn(6) { - case 1: - tutorialStep = "1" - case 2: - tutorialStep = "2" - case 3: - tutorialStep = "3" + if idx > 2 { + switch rand.Intn(6) { + case 1: + tutorialStep = "1" + case 2: + tutorialStep = "2" + case 3: + tutorialStep = "3" + } } teams := []app.UserTeamImportData{}