Merge branch 'master' into advanced-permissions-phase-1

Этот коммит содержится в:
George Goldberg
2018-02-06 17:25:53 +00:00
родитель e1cd646135 034dbc07e3
Коммит 7941c30117
1622 изменённых файлов: 185031 добавлений и 26488 удалений

Просмотреть файл

@@ -21,6 +21,9 @@ import (
_ "github.com/go-ldap/ldap"
_ "github.com/hashicorp/memberlist"
_ "github.com/mattermost/rsc/qr"
_ "github.com/prometheus/client_golang/prometheus"
_ "github.com/prometheus/client_golang/prometheus/promhttp"
_ "github.com/tylerb/graceful"
_ "gopkg.in/olivere/elastic.v5"
)

Просмотреть файл

@@ -346,22 +346,22 @@ func createUser(idx int, teamMemberships int, channelMemberships int, teamsAndCh
}
useMilitaryTime := "false"
if rand.Intn(2) == 0 {
if idx != 0 && rand.Intn(2) == 0 {
useMilitaryTime = "true"
}
collapsePreviews := "false"
if rand.Intn(2) == 0 {
if idx != 0 && rand.Intn(2) == 0 {
collapsePreviews = "true"
}
messageDisplay := "clean"
if rand.Intn(2) == 0 {
if idx != 0 && rand.Intn(2) == 0 {
messageDisplay = "compact"
}
channelDisplayMode := "full"
if rand.Intn(2) == 0 {
if idx != 0 && rand.Intn(2) == 0 {
channelDisplayMode = "centered"
}

Просмотреть файл

@@ -28,9 +28,10 @@ const (
var MaxNotificationsPerChannelDefault int64 = 1000000
var serverCmd = &cobra.Command{
Use: "server",
Short: "Run the Mattermost server",
RunE: runServerCmd,
Use: "server",
Short: "Run the Mattermost server",
RunE: runServerCmd,
SilenceUsage: true,
}
func runServerCmd(cmd *cobra.Command, args []string) error {
@@ -41,11 +42,10 @@ func runServerCmd(cmd *cobra.Command, args []string) error {
disableConfigWatch, _ := cmd.Flags().GetBool("disableconfigwatch")
runServer(config, disableConfigWatch)
return nil
return runServer(config, disableConfigWatch)
}
func runServer(configFileLocation string, disableConfigWatch bool) {
func runServer(configFileLocation string, disableConfigWatch bool) error {
options := []app.Option{app.ConfigFile(configFileLocation)}
if disableConfigWatch {
options = append(options, app.DisableConfigWatch)
@@ -54,7 +54,7 @@ func runServer(configFileLocation string, disableConfigWatch bool) {
a, err := app.New(options...)
if err != nil {
l4g.Error(err.Error())
return
return err
}
defer a.Shutdown()
@@ -174,6 +174,8 @@ func runServer(configFileLocation string, disableConfigWatch bool) {
a.Jobs.StopSchedulers()
a.Jobs.StopWorkers()
return nil
}
func runSecurityJob(a *app.App) {