PLT-1465 Added password requirements (#3489)

* Added password requirements

* added tweaks

* fixed error code

* removed http.StatusNotAcceptable
Этот коммит содержится в:
David Lu
2016-07-06 18:54:54 -04:00
коммит произвёл Corey Hulen
родитель 0c3c52b8d3
Коммит 683f713319
28 изменённых файлов: 792 добавлений и 283 удалений

Просмотреть файл

@@ -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 {