PLT-6504: Add ElasticSearch feature to license. (#6339)

Этот коммит содержится в:
George Goldberg
2017-05-09 13:56:07 +01:00
коммит произвёл Joram Wilander
родитель f88769d1f2
Коммит b25021b912
2 изменённых файлов: 24 добавлений и 12 удалений

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

@@ -49,24 +49,26 @@ type Features struct {
MHPNS *bool `json:"mhpns"`
SAML *bool `json:"saml"`
PasswordRequirements *bool `json:"password_requirements"`
ElasticSearch *bool `json:"elastic_search"`
// after we enabled more features for webrtc we'll need to control them with this
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,
"metrics": *f.Metrics,
"custom_brand": *f.CustomBrand,
"mhpns": *f.MHPNS,
"saml": *f.SAML,
"password": *f.PasswordRequirements,
"future": *f.FutureFeatures,
"ldap": *f.LDAP,
"mfa": *f.MFA,
"google": *f.GoogleOAuth,
"office365": *f.Office365OAuth,
"compliance": *f.Compliance,
"cluster": *f.Cluster,
"metrics": *f.Metrics,
"custom_brand": *f.CustomBrand,
"mhpns": *f.MHPNS,
"saml": *f.SAML,
"password": *f.PasswordRequirements,
"elastic_search": *f.ElasticSearch,
"future": *f.FutureFeatures,
}
}
@@ -135,6 +137,11 @@ func (f *Features) SetDefaults() {
f.PasswordRequirements = new(bool)
*f.PasswordRequirements = *f.FutureFeatures
}
if f.ElasticSearch == nil {
f.ElasticSearch = new(bool)
*f.ElasticSearch = *f.FutureFeatures
}
}
func (l *License) IsExpired() bool {