This commit is contained in:
@@ -119,7 +119,7 @@ namespace AyaNova.Api.Controllers
|
||||
PurchaseOrderBiz biz = PurchaseOrderBiz.GetBiz(ct, HttpContext);
|
||||
if (!Authorized.HasModifyRole(HttpContext.Items, biz.BizType))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
var o = await biz.PutAsync(updatedObject);
|
||||
var o = await biz.PutAsync(updatedObject);
|
||||
if (o == null)
|
||||
{
|
||||
if (biz.Errors.Exists(z => z.Code == ApiErrorCode.CONCURRENCY_CONFLICT))
|
||||
@@ -160,7 +160,7 @@ namespace AyaNova.Api.Controllers
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
// PurchaseOrderBiz biz = PurchaseOrderBiz.GetBiz(ct, HttpContext);
|
||||
// PurchaseOrderBiz biz = PurchaseOrderBiz.GetBiz(ct, HttpContext);
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.PurchaseOrder))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!ModelState.IsValid)
|
||||
@@ -172,7 +172,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Get work order item part request list for vendor specified or any vendor if no vendor specified
|
||||
/// </summary>
|
||||
/// <param name="vendorId">optional vendor id will return matches to Part objects manufacturer, wholesaler or alternative wholesaler</param>
|
||||
@@ -182,8 +182,8 @@ namespace AyaNova.Api.Controllers
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
PurchaseOrderBiz biz = PurchaseOrderBiz.GetBiz(ct, HttpContext);
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||
//PurchaseOrderBiz biz = PurchaseOrderBiz.GetBiz(ct, HttpContext);
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.PurchaseOrder))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
|
||||
Reference in New Issue
Block a user