diff options
author | George Goldberg <george@gberg.me> | 2017-05-09 13:56:07 +0100 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-05-09 07:56:07 -0500 |
commit | b25021b9129820147bf596b834d438ef218acf28 (patch) | |
tree | 5a50c3e8b6ddb97a9ec30ccdcf12f4f2e3e85029 /model/license.go | |
parent | f88769d1f2ba7f2097e9a545e18fb0c5eb4ea2e9 (diff) | |
download | chat-b25021b9129820147bf596b834d438ef218acf28.tar.gz chat-b25021b9129820147bf596b834d438ef218acf28.tar.bz2 chat-b25021b9129820147bf596b834d438ef218acf28.zip |
PLT-6504: Add ElasticSearch feature to license. (#6339)
Diffstat (limited to 'model/license.go')
-rw-r--r-- | model/license.go | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/model/license.go b/model/license.go index 57c49d3d8..558cd43fa 100644 --- a/model/license.go +++ b/model/license.go @@ -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 { |