summaryrefslogtreecommitdiffstats
path: root/model/license.go
diff options
context:
space:
mode:
authorDavid Lu <david.lu97@outlook.com>2016-09-06 18:51:27 -0400
committerenahum <nahumhbl@gmail.com>2016-09-06 19:51:27 -0300
commit51501f920c092791c7d83ac7067874547a37c96a (patch)
tree8665cdc82c4fa99ba5c2b6743c66e0912fd53ddb /model/license.go
parent47d77d258961f95f4348b4745da062c08731b283 (diff)
downloadchat-51501f920c092791c7d83ac7067874547a37c96a.tar.gz
chat-51501f920c092791c7d83ac7067874547a37c96a.tar.bz2
chat-51501f920c092791c7d83ac7067874547a37c96a.zip
PLT-3753 Added Segment analytics (#3972)
Diffstat (limited to 'model/license.go')
-rw-r--r--model/license.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/model/license.go b/model/license.go
index 98b88fdeb..1fce1eeb1 100644
--- a/model/license.go
+++ b/model/license.go
@@ -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)