PLT-3753 Added Segment analytics (#3972)

Этот коммит содержится в:
David Lu
2016-09-06 18:51:27 -04:00
коммит произвёл enahum
родитель 47d77d2589
Коммит 51501f920c
44 изменённых файлов: 2704 добавлений и 41 удалений

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

@@ -118,6 +118,7 @@ type LogSettings struct {
FileFormat string
FileLocation string
EnableWebhookDebugging bool
EnableDiagnostics *bool
}
type PasswordSettings struct {
@@ -781,6 +782,11 @@ func (o *Config) SetDefaults() {
*o.LocalizationSettings.AvailableLocales = ""
}
if o.LogSettings.EnableDiagnostics == nil {
o.LogSettings.EnableDiagnostics = new(bool)
*o.LogSettings.EnableDiagnostics = true
}
if o.SamlSettings.Enable == nil {
o.SamlSettings.Enable = new(bool)
*o.SamlSettings.Enable = false

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

@@ -46,6 +46,22 @@ type Features struct {
FutureFeatures *bool `json:"future_features"`
}
func (f *Features) ToMap() map[string]interface{} {
return map[string]interface{}{
"ldap": *f.LDAP,
"mfa": *f.MFA,
"google": *f.GoogleOAuth,
"office365": *f.Office365OAuth,
"compliance": *f.Compliance,
"cluster": *f.Cluster,
"custom_brand": *f.CustomBrand,
"mhpns": *f.MHPNS,
"saml": *f.SAML,
"password": *f.PasswordRequirements,
"future": *f.FutureFeatures,
}
}
func (f *Features) SetDefaults() {
if f.FutureFeatures == nil {
f.FutureFeatures = new(bool)