This commit is contained in:
2018-12-12 20:38:08 +00:00
parent 4d0c4da32b
commit 125cd51d6b
3 changed files with 52 additions and 6 deletions

View File

@@ -88,6 +88,33 @@ 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.IsAuthorizedToReadFullRecord(HttpContext.Items, biz.BizType))
return StatusCode(401, new ApiNotAuthorizedResponse());
return Ok(new
{
data = UserBiz.FilterOptions(biz.UserLocaleId)
});
}
/// <summary>
/// Get paged list of Users
///

View File

@@ -79,7 +79,7 @@ namespace AyaNova.Api.Controllers
/// <summary>
/// Get filter options
/// Get filter and sort options
///
/// Required roles:
/// BizAdminFull, InventoryFull, BizAdminLimited, InventoryLimited, TechFull, TechLimited, Accounting