summaryrefslogtreecommitdiffstats
path: root/model/license.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-05-03 11:54:49 -0400
committerCorey Hulen <corey@hulen.com>2016-05-03 08:54:49 -0700
commit08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc (patch)
tree66687c84dbda048f09954d6b7286f0a78fe5cd45 /model/license.go
parentffb4cb5e1051c3db13a8e3b1b2a9fd6fb8ed701c (diff)
downloadchat-08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc.tar.gz
chat-08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc.tar.bz2
chat-08a3cf6b38fd8fdac3b5f7176133bc1a248bc8fc.zip
Port HPNS from 2.2 to master (#2863)
Diffstat (limited to 'model/license.go')
-rw-r--r--model/license.go34
1 files changed, 23 insertions, 11 deletions
diff --git a/model/license.go b/model/license.go
index 0cea67c3d..bc72ff9ad 100644
--- a/model/license.go
+++ b/model/license.go
@@ -32,15 +32,22 @@ type Customer struct {
}
type Features struct {
- Users *int `json:"users"`
- LDAP *bool `json:"ldap"`
- MFA *bool `json:"mfa"`
- GoogleSSO *bool `json:"google_sso"`
- Compliance *bool `json:"compliance"`
- CustomBrand *bool `json:"custom_brand"`
+ Users *int `json:"users"`
+ LDAP *bool `json:"ldap"`
+ MFA *bool `json:"mfa"`
+ GoogleSSO *bool `json:"google_sso"`
+ Compliance *bool `json:"compliance"`
+ CustomBrand *bool `json:"custom_brand"`
+ MHPNS *bool `json:"mhpns"`
+ FutureFeatures *bool `json:"future_features"`
}
func (f *Features) SetDefaults() {
+ if f.FutureFeatures == nil {
+ f.FutureFeatures = new(bool)
+ *f.FutureFeatures = true
+ }
+
if f.Users == nil {
f.Users = new(int)
*f.Users = 0
@@ -48,27 +55,32 @@ func (f *Features) SetDefaults() {
if f.LDAP == nil {
f.LDAP = new(bool)
- *f.LDAP = true
+ *f.LDAP = *f.FutureFeatures
}
if f.MFA == nil {
f.MFA = new(bool)
- *f.MFA = true
+ *f.MFA = *f.FutureFeatures
}
if f.GoogleSSO == nil {
f.GoogleSSO = new(bool)
- *f.GoogleSSO = true
+ *f.GoogleSSO = *f.FutureFeatures
}
if f.Compliance == nil {
f.Compliance = new(bool)
- *f.Compliance = true
+ *f.Compliance = *f.FutureFeatures
}
if f.CustomBrand == nil {
f.CustomBrand = new(bool)
- *f.CustomBrand = true
+ *f.CustomBrand = *f.FutureFeatures
+ }
+
+ if f.MHPNS == nil {
+ f.MHPNS = new(bool)
+ *f.MHPNS = *f.FutureFeatures
}
}