MM-8810: Add CSV Compliance export (#8966)

* MM-8810: Add CSV Compliance export

* Only allowing to schedule actiances export throught the cli

* De-duplicating some code

* Fixes on texts

* Fixes on translations
Этот коммит содержится в:
Jesús Espino
2018-06-22 11:15:19 +02:00
коммит произвёл GitHub
родитель 8526739066
Коммит d9390244af
11 изменённых файлов: 129 добавлений и 30 удалений

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

@@ -156,6 +156,7 @@ const (
TIMEZONE_SETTINGS_DEFAULT_SUPPORTED_TIMEZONES_PATH = "timezones.json"
COMPLIANCE_EXPORT_TYPE_CSV = "csv"
COMPLIANCE_EXPORT_TYPE_ACTIANCE = "actiance"
COMPLIANCE_EXPORT_TYPE_GLOBALRELAY = "globalrelay"
GLOBALRELAY_CUSTOMER_TYPE_A9 = "A9"
@@ -2366,7 +2367,7 @@ 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) {
} else if mes.ExportFormat == nil || (*mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_ACTIANCE && *mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_GLOBALRELAY && *mes.ExportFormat != COMPLIANCE_EXPORT_TYPE_CSV) {
return NewAppError("Config.IsValid", "model.config.is_valid.message_export.export_type.app_error", nil, "", http.StatusBadRequest)
}

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

@@ -4,7 +4,12 @@
package model
type MessageExport struct {
TeamId *string
TeamName *string
TeamDisplayName *string
ChannelId *string
ChannelName *string
ChannelDisplayName *string
ChannelType *string
@@ -12,9 +17,10 @@ type MessageExport struct {
UserEmail *string
Username *string
PostId *string
PostCreateAt *int64
PostMessage *string
PostType *string
PostFileIds StringArray
PostId *string
PostCreateAt *int64
PostMessage *string
PostType *string
PostOriginalId *string
PostFileIds StringArray
}