add megacheck as makefile target (#9288)
Fix code issues in channel_test.go Fix Channel Test Issues detected by Megacheck Fix API Emoji Test Issues detected by Megacheck Fixed API Issues Reported by Megacheck Fixed App issues reported by megacheck Remaining fixes removed test added by mistake from old HEAD gofmt Store Fixes simplified returns Fix test for multi member channel delete revert to delete unused function
Этот коммит содержится в:
коммит произвёл
Jesús Espino
родитель
68fdaaa995
Коммит
531897b1f0
@@ -642,7 +642,6 @@ func (a *App) DoEmojisPermissionsMigration() {
|
||||
mlog.Critical(err.Error())
|
||||
return
|
||||
}
|
||||
break
|
||||
case model.RESTRICT_EMOJI_CREATION_ADMIN:
|
||||
role, err = a.GetRoleByName(model.TEAM_ADMIN_ROLE_ID)
|
||||
if err != nil {
|
||||
@@ -650,10 +649,8 @@ func (a *App) DoEmojisPermissionsMigration() {
|
||||
mlog.Critical(err.Error())
|
||||
return
|
||||
}
|
||||
break
|
||||
case model.RESTRICT_EMOJI_CREATION_SYSTEM_ADMIN:
|
||||
role = nil
|
||||
break
|
||||
default:
|
||||
mlog.Critical("Failed to migrate emojis creation permissions from mattermost config.")
|
||||
mlog.Critical("Invalid restrict emoji creation setting")
|
||||
@@ -703,13 +700,13 @@ func (a *App) StartElasticsearch() {
|
||||
})
|
||||
|
||||
a.AddConfigListener(func(oldConfig *model.Config, newConfig *model.Config) {
|
||||
if *oldConfig.ElasticsearchSettings.EnableIndexing == false && *newConfig.ElasticsearchSettings.EnableIndexing == true {
|
||||
if !*oldConfig.ElasticsearchSettings.EnableIndexing && *newConfig.ElasticsearchSettings.EnableIndexing {
|
||||
a.Go(func() {
|
||||
if err := a.Elasticsearch.Start(); err != nil {
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
})
|
||||
} else if *oldConfig.ElasticsearchSettings.EnableIndexing == true && *newConfig.ElasticsearchSettings.EnableIndexing == false {
|
||||
} else if *oldConfig.ElasticsearchSettings.EnableIndexing && !*newConfig.ElasticsearchSettings.EnableIndexing {
|
||||
a.Go(func() {
|
||||
if err := a.Elasticsearch.Stop(); err != nil {
|
||||
mlog.Error(err.Error())
|
||||
@@ -717,7 +714,7 @@ func (a *App) StartElasticsearch() {
|
||||
})
|
||||
} else if *oldConfig.ElasticsearchSettings.Password != *newConfig.ElasticsearchSettings.Password || *oldConfig.ElasticsearchSettings.Username != *newConfig.ElasticsearchSettings.Username || *oldConfig.ElasticsearchSettings.ConnectionUrl != *newConfig.ElasticsearchSettings.ConnectionUrl || *oldConfig.ElasticsearchSettings.Sniff != *newConfig.ElasticsearchSettings.Sniff {
|
||||
a.Go(func() {
|
||||
if *oldConfig.ElasticsearchSettings.EnableIndexing == true {
|
||||
if *oldConfig.ElasticsearchSettings.EnableIndexing {
|
||||
if err := a.Elasticsearch.Stop(); err != nil {
|
||||
mlog.Error(err.Error())
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user