remove license check when enforcing password requirements (#8840)
Signed-off-by: Saturnino Abril <saturnino.abril@gmail.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ce378adc97
Коммит
70a118c0fd
@@ -49,7 +49,6 @@ type Features struct {
|
||||
CustomBrand *bool `json:"custom_brand"`
|
||||
MHPNS *bool `json:"mhpns"`
|
||||
SAML *bool `json:"saml"`
|
||||
PasswordRequirements *bool `json:"password_requirements"`
|
||||
Elasticsearch *bool `json:"elastic_search"`
|
||||
Announcement *bool `json:"announcement"`
|
||||
ThemeManagement *bool `json:"theme_management"`
|
||||
@@ -73,7 +72,6 @@ func (f *Features) ToMap() map[string]interface{} {
|
||||
"custom_brand": *f.CustomBrand,
|
||||
"mhpns": *f.MHPNS,
|
||||
"saml": *f.SAML,
|
||||
"password": *f.PasswordRequirements,
|
||||
"elastic_search": *f.Elasticsearch,
|
||||
"email_notification_contents": *f.EmailNotificationContents,
|
||||
"data_retention": *f.DataRetention,
|
||||
@@ -131,10 +129,6 @@ func (f *Features) SetDefaults() {
|
||||
f.SAML = NewBool(*f.FutureFeatures)
|
||||
}
|
||||
|
||||
if f.PasswordRequirements == nil {
|
||||
f.PasswordRequirements = NewBool(*f.FutureFeatures)
|
||||
}
|
||||
|
||||
if f.Elasticsearch == nil {
|
||||
f.Elasticsearch = NewBool(*f.FutureFeatures)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ func TestLicenseFeaturesToMap(t *testing.T) {
|
||||
CheckTrue(t, m["custom_brand"].(bool))
|
||||
CheckTrue(t, m["mhpns"].(bool))
|
||||
CheckTrue(t, m["saml"].(bool))
|
||||
CheckTrue(t, m["password"].(bool))
|
||||
CheckTrue(t, m["elastic_search"].(bool))
|
||||
CheckTrue(t, m["email_notification_contents"].(bool))
|
||||
CheckTrue(t, m["data_retention"].(bool))
|
||||
@@ -46,7 +45,6 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
|
||||
CheckTrue(t, *f.CustomBrand)
|
||||
CheckTrue(t, *f.MHPNS)
|
||||
CheckTrue(t, *f.SAML)
|
||||
CheckTrue(t, *f.PasswordRequirements)
|
||||
CheckTrue(t, *f.Elasticsearch)
|
||||
CheckTrue(t, *f.EmailNotificationContents)
|
||||
CheckTrue(t, *f.DataRetention)
|
||||
@@ -67,7 +65,6 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
|
||||
*f.CustomBrand = true
|
||||
*f.MHPNS = true
|
||||
*f.SAML = true
|
||||
*f.PasswordRequirements = true
|
||||
*f.Elasticsearch = true
|
||||
*f.DataRetention = true
|
||||
*f.EmailNotificationContents = true
|
||||
@@ -85,7 +82,6 @@ func TestLicenseFeaturesSetDefaults(t *testing.T) {
|
||||
CheckTrue(t, *f.CustomBrand)
|
||||
CheckTrue(t, *f.MHPNS)
|
||||
CheckTrue(t, *f.SAML)
|
||||
CheckTrue(t, *f.PasswordRequirements)
|
||||
CheckTrue(t, *f.Elasticsearch)
|
||||
CheckTrue(t, *f.EmailNotificationContents)
|
||||
CheckTrue(t, *f.DataRetention)
|
||||
@@ -168,7 +164,6 @@ func TestLicenseToFromJson(t *testing.T) {
|
||||
CheckBool(t, *f1.CustomBrand, *f.CustomBrand)
|
||||
CheckBool(t, *f1.MHPNS, *f.MHPNS)
|
||||
CheckBool(t, *f1.SAML, *f.SAML)
|
||||
CheckBool(t, *f1.PasswordRequirements, *f.PasswordRequirements)
|
||||
CheckBool(t, *f1.Elasticsearch, *f.Elasticsearch)
|
||||
CheckBool(t, *f1.DataRetention, *f.DataRetention)
|
||||
CheckBool(t, *f1.FutureFeatures, *f.FutureFeatures)
|
||||
|
||||
Ссылка в новой задаче
Block a user