diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 864e2b1e..4d6cedf9 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -15,6 +15,8 @@ THINGS HOLDING UP PERPETUAL RELEASE - Announcement email with migration plan and costs and offers etc +todo: rockfish needs to be able to enter a shareit sale of raven licenses (all the features like paste in etc) + product codes already added todo: implement and test new system to prevent download subscription instance database and just use locally, i.e. check for special file or whatever system we implement check for subscription key file presence and signature inside to be checked in case they parse the code and put teh file by that name needs to be not enough but signed inside too diff --git a/server/AyaNova/util/License.cs b/server/AyaNova/util/License.cs index a051d1c0..9e5ebc76 100644 --- a/server/AyaNova/util/License.cs +++ b/server/AyaNova/util/License.cs @@ -59,7 +59,7 @@ namespace AyaNova.Core private const string TRIAL_FEATURE_NAME = "TrialMode"; //This feature name means it's a SAAS or rental mode key for month to month hosted service - private const string RENTAL_FEATURE_NAME = "Subscription"; + // private const string RENTAL_FEATURE_NAME = "Subscription"; //Trial key magic number for development and testing, all other guids will be fully licensed @@ -243,18 +243,13 @@ namespace AyaNova.Core } } - public bool RentalLicense - { - get - { - return HasLicenseFeature(RENTAL_FEATURE_NAME); - } - } + public string LicenseFormat { get; set; } public string Id { get; set; } public string RegisteredTo { get; set; } public string DbId { get; set; } + public bool Perpetual { get; set; } public DateTime LicenseExpiration { get; set; } public DateTime MaintenanceExpiration { get; set; } public List Features { get; set; } @@ -332,7 +327,7 @@ namespace AyaNova.Core sb.AppendLine($"Registered to: {ActiveKey.RegisteredTo}"); //sb.AppendLine($"Key ID: {ActiveKey.Id}"); //sb.AppendLine($"Server DB ID: {ServerDbId}"); - sb.AppendLine($"Type: {(ActiveKey.RentalLicense ? "Subscription" : "Perpetual")}"); + sb.AppendLine($"Type: {(ActiveKey.Perpetual ? "Perpetual" : "Subscription")}"); if (ActiveKey.WillExpire) sb.AppendLine($"License expires: {DateUtil.ServerDateTimeString(ActiveKey.LicenseExpiration)}"); sb.AppendLine($"Maintenance subscription expires: {DateUtil.ServerDateTimeString(ActiveKey.MaintenanceExpiration)}"); @@ -340,7 +335,7 @@ namespace AyaNova.Core foreach (LicenseFeature l in ActiveKey.Features) { //don't show the rental or trial features - if (l.Feature != TRIAL_FEATURE_NAME && l.Feature != RENTAL_FEATURE_NAME) + if (l.Feature != TRIAL_FEATURE_NAME) { if (l.Count != 0) sb.AppendLine($"{l.Feature} - {l.Count}"); @@ -379,7 +374,7 @@ namespace AyaNova.Core sb.Append($"keyid: {ActiveKey.Id}, "); sb.Append($"dbid: {LicenseDbId}, "); // sb.Append($"serverdbid: {ServerDbId}"); - sb.Append($"type: {(ActiveKey.RentalLicense ? "subscription" : "perpetual")}, "); + sb.Append($"type: {(ActiveKey.Perpetual ? "perpetual" : "subscription")}, "); if (ActiveKey.WillExpire) sb.Append($"exp: {DateUtil.ServerDateTimeString(ActiveKey.LicenseExpiration)} (utc), "); sb.Append($"maint. sub. exps: {DateUtil.ServerDateTimeString(ActiveKey.MaintenanceExpiration)} (utc), "); @@ -387,7 +382,7 @@ namespace AyaNova.Core foreach (LicenseFeature l in ActiveKey.Features) { //don't show the rental or trial features - if (l.Feature != TRIAL_FEATURE_NAME && l.Feature != RENTAL_FEATURE_NAME) + if (l.Feature != TRIAL_FEATURE_NAME) { if (l.Count != 0) sb.Append($"{l.Feature} - {l.Count}, "); @@ -958,8 +953,8 @@ EQIDAQAB //users can upgrade them any time if (k.TrialLicense) return false; - //Do not worry about rental SAAS licenses, only we can upgrade them - if(k.RentalLicense) return false; + //Do not worry about subscription licenses, only we can upgrade them adn they are always valid to be upgraded + if (!k.Perpetual) return false; //Ok, it's a perpetual license and not a trial so check away return k.MaintenanceExpiration < dtB;