From aadf4e054045ac5cbcc94466b04731b9e2c36992 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 11 Jun 2020 15:24:43 +0000 Subject: [PATCH] --- notes/todo | 13 ++++++++++--- util/RavenKeyFactory.cs | 10 ++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/notes/todo b/notes/todo index 10ccdfa..a86ebf3 100644 --- a/notes/todo +++ b/notes/todo @@ -54,8 +54,7 @@ SITE UI AND TABLE ADD DBID as text (and ui) LICENSE TABLE - Add DBID as text to table for v8 keys - Add Revoked as bool to table for v8 keys + Add DBID as text to table for v8 keys PURCHASE TABLE Add quantity to purchase and default to 1 @@ -67,12 +66,20 @@ License UI modify with tabs for v8 and v7 version just stub in basic with no options for now or whatever the absolute required will be for v8 the key is stored in the table same as v7 but with dbid and different format (obvs) + Add an option to generate a revocation key for non-payment + click on a button to generate a revocation key + rf will set all prior keys to fetched for that dbid + rf will generate a new key for dbid with regto set to UNLICENSED_TOKEN + rf will set LicenseExpiration to yesterday + rf will set MaintenanceExpiration yesterday + RAVEN will fetch it and install it and they will be unlicensed + route: rvfcontroller checks license table and trial table, looks for unfetched key checks license first for unfetched and matching dbid checks trial second for unfetched and matching dbid - checks revoke list?(future) + diff --git a/util/RavenKeyFactory.cs b/util/RavenKeyFactory.cs index 24ccad2..3264225 100644 --- a/util/RavenKeyFactory.cs +++ b/util/RavenKeyFactory.cs @@ -15,6 +15,12 @@ namespace rockfishCore.Util //Key generator controller public static class RavenKeyFactory { + //Unlicensed token + private const string UNLICENSED_TOKEN = "UNLICENSED"; + + //REVOKED token + private const string REVOKED_TOKEN = "REVOKED"; + //Scheduleable users private const string SERVICE_TECHS_FEATURE_NAME = "ServiceTechs"; @@ -46,7 +52,7 @@ namespace rockfishCore.Util public AyaNovaLicenseKey() { Features = new List(); - RegisteredTo = "UNLICENSED"; + RegisteredTo = UNLICENSED_TOKEN; Id = RegisteredTo; } @@ -234,7 +240,7 @@ namespace rockfishCore.Util k.MaintenanceExpiration = DateTime.UtcNow.AddYears(1); k.LicenseExpiration = DateUtil.EmptyDateValue;//1/1/5555 as per spec } - + return genKey(k); }