diff options
Diffstat (limited to 'vendor/github.com/mattermost/mattermost-server/v6/model/config.go')
-rw-r--r-- | vendor/github.com/mattermost/mattermost-server/v6/model/config.go | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/vendor/github.com/mattermost/mattermost-server/v6/model/config.go b/vendor/github.com/mattermost/mattermost-server/v6/model/config.go index 39cdb893..a2eda9ff 100644 --- a/vendor/github.com/mattermost/mattermost-server/v6/model/config.go +++ b/vendor/github.com/mattermost/mattermost-server/v6/model/config.go @@ -352,6 +352,7 @@ type ServiceSettings struct { EnableBotAccountCreation *bool `access:"integrations_bot_accounts"` EnableSVGs *bool `access:"site_posts"` EnableLatex *bool `access:"site_posts"` + EnableInlineLatex *bool `access:"site_posts"` EnableAPIChannelDeletion *bool EnableLocalMode *bool LocalModeSocketLocation *string // telemetry: none @@ -736,6 +737,10 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) { } } + if s.EnableInlineLatex == nil { + s.EnableInlineLatex = NewBool(true) + } + if s.EnableLocalMode == nil { s.EnableLocalMode = NewBool(false) } @@ -2610,8 +2615,9 @@ func (s *DataRetentionSettings) SetDefaults() { } type JobSettings struct { - RunJobs *bool `access:"write_restrictable,cloud_restrictable"` - RunScheduler *bool `access:"write_restrictable,cloud_restrictable"` + RunJobs *bool `access:"write_restrictable,cloud_restrictable"` + RunScheduler *bool `access:"write_restrictable,cloud_restrictable"` + CleanupJobsThresholdDays *int `access:"write_restrictable,cloud_restrictable"` } func (s *JobSettings) SetDefaults() { @@ -2622,6 +2628,10 @@ func (s *JobSettings) SetDefaults() { if s.RunScheduler == nil { s.RunScheduler = NewBool(true) } + + if s.CleanupJobsThresholdDays == nil { + s.CleanupJobsThresholdDays = NewInt(-1) + } } type CloudSettings struct { @@ -3736,9 +3746,11 @@ func (o *Config) Sanitize() { *o.LdapSettings.BindPassword = FakeSetting } - *o.FileSettings.PublicLinkSalt = FakeSetting + if o.FileSettings.PublicLinkSalt != nil { + *o.FileSettings.PublicLinkSalt = FakeSetting + } - if *o.FileSettings.AmazonS3SecretAccessKey != "" { + if o.FileSettings.AmazonS3SecretAccessKey != nil && *o.FileSettings.AmazonS3SecretAccessKey != "" { *o.FileSettings.AmazonS3SecretAccessKey = FakeSetting } @@ -3746,7 +3758,7 @@ func (o *Config) Sanitize() { *o.EmailSettings.SMTPPassword = FakeSetting } - if *o.GitLabSettings.Secret != "" { + if o.GitLabSettings.Secret != nil && *o.GitLabSettings.Secret != "" { *o.GitLabSettings.Secret = FakeSetting } @@ -3762,10 +3774,17 @@ func (o *Config) Sanitize() { *o.OpenIdSettings.Secret = FakeSetting } - *o.SqlSettings.DataSource = FakeSetting - *o.SqlSettings.AtRestEncryptKey = FakeSetting + if o.SqlSettings.DataSource != nil { + *o.SqlSettings.DataSource = FakeSetting + } - *o.ElasticsearchSettings.Password = FakeSetting + if o.SqlSettings.AtRestEncryptKey != nil { + *o.SqlSettings.AtRestEncryptKey = FakeSetting + } + + if o.ElasticsearchSettings.Password != nil { + *o.ElasticsearchSettings.Password = FakeSetting + } for i := range o.SqlSettings.DataSourceReplicas { o.SqlSettings.DataSourceReplicas[i] = FakeSetting @@ -3775,7 +3794,9 @@ func (o *Config) Sanitize() { o.SqlSettings.DataSourceSearchReplicas[i] = FakeSetting } - if o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != nil && *o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != "" { + if o.MessageExportSettings.GlobalRelaySettings != nil && + o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != nil && + *o.MessageExportSettings.GlobalRelaySettings.SMTPPassword != "" { *o.MessageExportSettings.GlobalRelaySettings.SMTPPassword = FakeSetting } @@ -3783,7 +3804,9 @@ func (o *Config) Sanitize() { *o.ServiceSettings.GfycatAPISecret = FakeSetting } - *o.ServiceSettings.SplitKey = FakeSetting + if o.ServiceSettings.SplitKey != nil { + *o.ServiceSettings.SplitKey = FakeSetting + } } // structToMapFilteredByTag converts a struct into a map removing those fields that has the tag passed |