EE: Don't enforce start date on licenses (#3645)

Этот коммит содержится в:
Joram Wilander
2016-07-20 17:32:57 -04:00
коммит произвёл enahum
родитель 9b24f4dc4c
Коммит 2bf81a9f09
2 изменённых файлов: 3 добавлений и 3 удалений

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

@@ -49,7 +49,7 @@ func LoadLicense(licenseBytes []byte) {
func SetLicense(license *model.License) bool {
license.Features.SetDefaults()
if !license.IsExpired() && license.IsStarted() {
if !license.IsExpired() {
License = license
IsLicensed = true
ClientLicense = getClientLicense(license)

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

@@ -32,8 +32,8 @@ func TestSetLicense(t *testing.T) {
l3.Customer = &model.Customer{}
l3.StartsAt = model.GetMillis() + 10000
l3.ExpiresAt = model.GetMillis() + 100000
if ok := SetLicense(l3); ok {
t.Fatal("license should have failed")
if ok := SetLicense(l3); !ok {
t.Fatal("license should have passed")
}
}