EE: Don't enforce start date on licenses (#3645)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
9b24f4dc4c
Коммит
2bf81a9f09
@@ -49,7 +49,7 @@ func LoadLicense(licenseBytes []byte) {
|
|||||||
func SetLicense(license *model.License) bool {
|
func SetLicense(license *model.License) bool {
|
||||||
license.Features.SetDefaults()
|
license.Features.SetDefaults()
|
||||||
|
|
||||||
if !license.IsExpired() && license.IsStarted() {
|
if !license.IsExpired() {
|
||||||
License = license
|
License = license
|
||||||
IsLicensed = true
|
IsLicensed = true
|
||||||
ClientLicense = getClientLicense(license)
|
ClientLicense = getClientLicense(license)
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ func TestSetLicense(t *testing.T) {
|
|||||||
l3.Customer = &model.Customer{}
|
l3.Customer = &model.Customer{}
|
||||||
l3.StartsAt = model.GetMillis() + 10000
|
l3.StartsAt = model.GetMillis() + 10000
|
||||||
l3.ExpiresAt = model.GetMillis() + 100000
|
l3.ExpiresAt = model.GetMillis() + 100000
|
||||||
if ok := SetLicense(l3); ok {
|
if ok := SetLicense(l3); !ok {
|
||||||
t.Fatal("license should have failed")
|
t.Fatal("license should have passed")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user