This commit is contained in:
2020-06-10 14:42:14 +00:00
parent ff20c44710
commit 571f11236e
2 changed files with 3 additions and 35 deletions

View File

@@ -107,37 +107,11 @@ namespace AyaNova.Api.Controllers
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
}
//Instantiate the business object handler
// GlobalBizSettingsBiz biz = GlobalBizSettingsBiz.GetBiz(ct, HttpContext);
//this route is available to any logged in user as it contains a subset of limited options relevant to any logged in user
// if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
// return StatusCode(403, new ApiNotAuthorizedResponse());
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
// var o = await biz.GetAsync();
// if (o == null)
// return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
// Return a license state enumeration value
// 0 = No license at all of any kind
// 1 = trial license key
// 2 = purchased license key
// 3 = purchased but expired key (license itself is expired, not the maintenance, that's seperate)
// Note: this has nothing to do with whether there is an active license or not, merely that it's of a type
// this is so client can display appropriate UI
//new object with only relevant items in it
var ret = new
{
SearchCaseSensitiveOnly = AyaNova.Util.ServerGlobalBizSettings.SearchCaseSensitiveOnly,
LicenseState = AyaNova.Core.License.ActiveKey.Status
//used to drive UI in case of unlicensed or attention required
LicenseStatus = AyaNova.Core.License.ActiveKey.Status
};
return Ok(ApiOkResponse.Response(ret));

View File

@@ -73,13 +73,7 @@ namespace AyaNova.Core
//DTO object for parsed key
internal class AyaNovaLicenseKey
{
// Return a license state enumeration value
// 0 = No license at all of any kind
// 1 = trial license key
// 2 = purchased license key
// 3 = purchased but expired key (license itself is expired, not the maintenance, that's seperate)
// Note: this has nothing to do with whether there is an active license or not, merely that it's of a type
// this is so client can display appropriate UI
public enum LicenseStatus
{
NONE = 0,