This commit is contained in:
@@ -107,37 +107,11 @@ namespace AyaNova.Api.Controllers
|
|||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
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
|
var ret = new
|
||||||
{
|
{
|
||||||
SearchCaseSensitiveOnly = AyaNova.Util.ServerGlobalBizSettings.SearchCaseSensitiveOnly,
|
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));
|
return Ok(ApiOkResponse.Response(ret));
|
||||||
|
|||||||
@@ -73,13 +73,7 @@ namespace AyaNova.Core
|
|||||||
//DTO object for parsed key
|
//DTO object for parsed key
|
||||||
internal class AyaNovaLicenseKey
|
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
|
public enum LicenseStatus
|
||||||
{
|
{
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user