summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/config.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-12-12 00:05:15 +0100
committerGitHub <noreply@github.com>2021-12-12 00:05:15 +0100
commit3893a035be347a7687a41d2054dd1b274d3a0504 (patch)
treedfe4a3bf72a0a6356e51bd8fc2e88e9a26e52331 /vendor/github.com/mattermost/mattermost-server/v6/model/config.go
parent658bdd9faa835660ae407331732e9d93d8f6443b (diff)
downloadmatterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.gz
matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.bz2
matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.zip
Update dependencies/vendor (#1659)
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.go43
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