case 4217

This commit is contained in:
2022-10-25 19:54:35 +00:00
parent 0290518a38
commit abe0d2c82a
2 changed files with 40 additions and 39 deletions

View File

@@ -38,16 +38,17 @@ namespace rockfishCore.Controllers
string FetchRequestDbId = fetchRequest.DbId;
if (dtt)
{
return Ok(new
{
data = new
{
key = RavenKeyFactory.GetRavenTestKey(FetchRequestDbId, pp)//pp means perpetual no pp means subcription
}
});
}
//removed from release build 2022-10-25
// if (dtt)
// {
// return Ok(new
// {
// data = new
// {
// key = RavenKeyFactory.GetRavenTestKey(FetchRequestDbId, pp)//pp means perpetual no pp means subcription
// }
// });
// }
string LicenseKey = null;
//check for a key for this dbid, first check licensed then check trial

View File

@@ -245,38 +245,38 @@ namespace rockfishCore.Util
}
//TESTING ONLY this is for development purposes only
//No external usage
public static string GetRavenTestKey(string dbid, bool Perpetual)
{
//Build a sample test key, sign it and return it
AyaNovaLicenseKey k = new AyaNovaLicenseKey();
k.LicenseFormat = "8";
k.RegisteredTo = "GZ TestCo Inc.";
k.DbId = dbid;
k.Perpetual = Perpetual;
if (Perpetual)
{
k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
//5k inside staff users will cover huge seeding level easily
k.Features.Add(new LicenseFeature() { Feature = ACTIVE_INTERNAL_USERS_FEATURE_NAME, Count = 5000 });
}
else
{
//SUBSCRIPTION
k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
// //TESTING ONLY this is for development purposes only
// //No external usage
// public static string GetRavenTestKey(string dbid, bool Perpetual)
// {
// //Build a sample test key, sign it and return it
// AyaNovaLicenseKey k = new AyaNovaLicenseKey();
// k.LicenseFormat = "8";
// k.RegisteredTo = "GZ TestCo Inc.";
// k.DbId = dbid;
// k.Perpetual = Perpetual;
// if (Perpetual)
// {
// k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
// //5k inside staff users will cover huge seeding level easily
// k.Features.Add(new LicenseFeature() { Feature = ACTIVE_INTERNAL_USERS_FEATURE_NAME, Count = 5000 });
// }
// else
// {
// //SUBSCRIPTION
// k.MaintenanceExpiration = k.LicenseExpiration = DateTime.UtcNow.AddDays(TRIAL_PERIOD_DAYS);
//20k customer contacts will cover huge seeding level easily
//5k inside staff users will cover huge seeding level easily
k.Features.Add(new LicenseFeature() { Feature = ACTIVE_INTERNAL_USERS_FEATURE_NAME, Count = 5000 });
k.Features.Add(new LicenseFeature() { Feature = ACTIVE_CUSTOMER_USERS_FEATURE_NAME, Count = 20000 });
k.Features.Add(new LicenseFeature() { Feature = MAXIMUM_DATA_GB_FEATURE_NAME, Count = 20 });
// //20k customer contacts will cover huge seeding level easily
// //5k inside staff users will cover huge seeding level easily
// k.Features.Add(new LicenseFeature() { Feature = ACTIVE_INTERNAL_USERS_FEATURE_NAME, Count = 5000 });
// k.Features.Add(new LicenseFeature() { Feature = ACTIVE_CUSTOMER_USERS_FEATURE_NAME, Count = 20000 });
// k.Features.Add(new LicenseFeature() { Feature = MAXIMUM_DATA_GB_FEATURE_NAME, Count = 20 });
}
// }
k.Features.Add(new LicenseFeature() { Feature = TRIAL_FEATURE_NAME, Count = 0 });
return GenerateRavenKey(k);
}
// k.Features.Add(new LicenseFeature() { Feature = TRIAL_FEATURE_NAME, Count = 0 });
// return GenerateRavenKey(k);
// }
/// <summary>