This commit is contained in:
2020-01-14 19:17:26 +00:00
parent 9e3b449e14
commit d4324949b2
7 changed files with 43 additions and 184 deletions

View File

@@ -88,34 +88,6 @@ namespace AyaNova.Api.Controllers
}
/// <summary>
/// Get filter and sort options
///
/// Required roles:
/// BizAdminFull, InventoryFull, BizAdminLimited, InventoryLimited, TechFull, TechLimited, Accounting
///
/// </summary>
/// <returns>Filter options</returns>
[HttpGet("FilterOptions")]
public ActionResult FilterOptions()
{
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
//Instantiate the business object handler
UserBiz biz = UserBiz.GetBiz(ct, HttpContext);
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
return StatusCode(403, new ApiNotAuthorizedResponse());
return Ok(new
{
data = UserBiz.FilterOptions(biz.UserLocaleId)
});
}
/// <summary>
/// Get paged list of Users
///
@@ -316,7 +288,7 @@ namespace AyaNova.Api.Controllers
///
/// </summary>
/// <param name="inObj"></param>
/// <param name="apiVersion">Automatically filled from route path, no need to specify in body</param>
/// <param name="apiVersion">Automatically filled from route path, no need to specify in body</param>
/// <returns></returns>
[HttpPost]
public async Task<IActionResult> PostUser([FromBody] User inObj, ApiVersion apiVersion)