summaryrefslogtreecommitdiffstats
path: root/model/license.go
diff options
context:
space:
mode:
authorDavid Lu <david.lu@hotmail.com>2016-07-06 18:54:54 -0400
committerCorey Hulen <corey@hulen.com>2016-07-06 14:54:54 -0800
commit683f7133190aa350cdd1ea2608c90fe5f47b35cd (patch)
tree3f1bcc19d3bc1a7dedd407c266ea63cdda5ed9c9 /model/license.go
parent0c3c52b8d3a3503c35481a287ba27f626749503a (diff)
downloadchat-683f7133190aa350cdd1ea2608c90fe5f47b35cd.tar.gz
chat-683f7133190aa350cdd1ea2608c90fe5f47b35cd.tar.bz2
chat-683f7133190aa350cdd1ea2608c90fe5f47b35cd.zip
PLT-1465 Added password requirements (#3489)
* Added password requirements * added tweaks * fixed error code * removed http.StatusNotAcceptable
Diffstat (limited to 'model/license.go')
-rw-r--r--model/license.go24
1 files changed, 15 insertions, 9 deletions
diff --git a/model/license.go b/model/license.go
index 9781e3bf0..a77a7349a 100644
--- a/model/license.go
+++ b/model/license.go
@@ -32,15 +32,16 @@ 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"`
- MHPNS *bool `json:"mhpns"`
- SAML *bool `json:"saml"`
- FutureFeatures *bool `json:"future_features"`
+ 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"`
+ SAML *bool `json:"saml"`
+ PasswordRequirements *bool `json:"password_requirements"`
+ FutureFeatures *bool `json:"future_features"`
}
func (f *Features) SetDefaults() {
@@ -88,6 +89,11 @@ func (f *Features) SetDefaults() {
f.SAML = new(bool)
*f.SAML = *f.FutureFeatures
}
+
+ if f.PasswordRequirements == nil {
+ f.PasswordRequirements = new(bool)
+ *f.PasswordRequirements = *f.FutureFeatures
+ }
}
func (l *License) IsExpired() bool {