diff --git a/server/AyaNova/Controllers/GlobalBizSettingsController.cs b/server/AyaNova/Controllers/GlobalBizSettingsController.cs index e9b5c032..bd1234a9 100644 --- a/server/AyaNova/Controllers/GlobalBizSettingsController.cs +++ b/server/AyaNova/Controllers/GlobalBizSettingsController.cs @@ -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)); diff --git a/server/AyaNova/util/License.cs b/server/AyaNova/util/License.cs index 35d78cf5..0c1e9da7 100644 --- a/server/AyaNova/util/License.cs +++ b/server/AyaNova/util/License.cs @@ -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,