summaryrefslogtreecommitdiffstats
path: root/model/license.go
diff options
context:
space:
mode:
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)