summaryrefslogtreecommitdiffstats
path: root/model/config.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-02-12 18:36:39 -0600
committerGitHub <noreply@github.com>2018-02-12 18:36:39 -0600
commitfbef16f8630f74248157c2cd9e546ece355c869a (patch)
tree95feb1a0b94f43fd38533adc508df2daf823ea86 /model/config.go
parent56f49cf4860cfca51e852ec3e7d9df772d2b2060 (diff)
parent32c1f7be239ddb19d6c59b114d9ae1a543f8ba9c (diff)
downloadchat-fbef16f8630f74248157c2cd9e546ece355c869a.tar.gz
chat-fbef16f8630f74248157c2cd9e546ece355c869a.tar.bz2
chat-fbef16f8630f74248157c2cd9e546ece355c869a.zip
Merge branch 'release-4.7' into rm-willnorris-proxy-support
Diffstat (limited to 'model/config.go')
-rw-r--r--model/config.go21
1 files changed, 0 insertions, 21 deletions
diff --git a/model/config.go b/model/config.go
index 898099d12..7390b4fd9 100644
--- a/model/config.go
+++ b/model/config.go
@@ -158,9 +158,6 @@ const (
PLUGIN_SETTINGS_DEFAULT_DIRECTORY = "./plugins"
PLUGIN_SETTINGS_DEFAULT_CLIENT_DIRECTORY = "./client/plugins"
-
- COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance"
- COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay"
)
type ServiceSettings struct {
@@ -1626,13 +1623,9 @@ func (s *PluginSettings) SetDefaults() {
type MessageExportSettings struct {
EnableExport *bool
- ExportFormat *string
DailyRunTime *string
ExportFromTimestamp *int64
BatchSize *int
-
- // formatter-specific settings - these are only expected to be non-nil if ExportFormat is set to the associated format
- GlobalRelayEmailAddress *string
}
func (s *MessageExportSettings) SetDefaults() {
@@ -1640,10 +1633,6 @@ func (s *MessageExportSettings) SetDefaults() {
s.EnableExport = NewBool(false)
}
- if s.ExportFormat == nil {
- s.ExportFormat = NewString(COMPLIANCE_EXPORT_TYPE_ACTIANCE)
- }
-
if s.DailyRunTime == nil {
s.DailyRunTime = NewString("01:00")
}
@@ -2181,16 +2170,6 @@ func (mes *MessageExportSettings) isValid(fs FileSettings) *AppError {
return NewAppError("Config.IsValid", "model.config.is_valid.message_export.daily_runtime.app_error", nil, err.Error(), http.StatusBadRequest)
} else if mes.BatchSize == nil || *mes.BatchSize < 0 {
return NewAppError("Config.IsValid", "model.config.is_valid.message_export.batch_size.app_error", nil, "", http.StatusBadRequest)
- } else if mes.ExportFormat == nil || (*mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_ACTIANCE && *mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_GLOBALRELAY) {
- return NewAppError("Config.IsValid", "model.config.is_valid.message_export.export_type.app_error", nil, "", http.StatusBadRequest)
- }
-
- if *mes.ExportFormat == COMPLIANCE_EXPORT_TYPE_GLOBALRELAY {
- // validating email addresses is hard - just make sure it contains an '@' sign
- // see https://stackoverflow.com/questions/201323/using-a-regular-expression-to-validate-an-email-address
- if mes.GlobalRelayEmailAddress == nil || !strings.Contains(*mes.GlobalRelayEmailAddress, "@") {
- return NewAppError("Config.IsValid", "model.config.is_valid.message_export.global_relay_email_address.app_error", nil, "", http.StatusBadRequest)
- }
}
}
return nil