This commit is contained in:
@@ -676,6 +676,9 @@ namespace Sockeye.Biz
|
||||
l.TrialMode = true;
|
||||
|
||||
l.Key = sKey;
|
||||
//get number of users count and features etc
|
||||
LicenseBiz.ParseKeySetDTOFields(l);
|
||||
|
||||
//Parse key as we need the expiry dates and they are only stored in the key not the trial request
|
||||
string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(l.Key, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1");
|
||||
var jKey = JObject.Parse(keyNoWS);
|
||||
@@ -707,12 +710,30 @@ namespace Sockeye.Biz
|
||||
|
||||
l.Active = true;//active here means it's been fully prepared and is viable for use, all prior licenses fit this description so all are active
|
||||
l.NotificationSent = true;
|
||||
//workaround sketchy old testing licenses
|
||||
if (l.PGroup == ProductGroup.RavenSubscription)
|
||||
{
|
||||
if (l.MaxDataGB == null || l.MaxDataGB == 0)
|
||||
l.MaxDataGB = 20;
|
||||
|
||||
if (l.CustomerUsers == null || l.CustomerUsers == 0)
|
||||
l.CustomerUsers = 250;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
LicenseBiz lbiz = LicenseBiz.GetBiz(ct);
|
||||
var newLicenseObject = await lbiz.CreateAsync(l, true);
|
||||
|
||||
#if (DEBUG)
|
||||
if (newLicenseObject == null)
|
||||
;
|
||||
else
|
||||
TrialKeyId = newLicenseObject.Id;
|
||||
{
|
||||
System.Diagnostics.Debugger.Break();
|
||||
}
|
||||
#endif
|
||||
TrialKeyId = newLicenseObject.Id;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -730,7 +751,7 @@ namespace Sockeye.Biz
|
||||
tlr.Processed = DateUtil.EpochToDateNullIsNull(jTrialRequestItem["dtProcessed"].Value<long?>());
|
||||
tlr.Status = (TrialRequestStatus)jTrialRequestItem["status"].Value<int>();
|
||||
tlr.RejectReason = jTrialRequestItem["rejectReason"].Value<string>();
|
||||
tlr.KeyId = TrialKeyId;
|
||||
tlr.LicenseId = TrialKeyId;
|
||||
var biz = TrialLicenseRequestBiz.GetBiz(ct);
|
||||
await biz.CreateAsync(tlr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user