This commit is contained in:
@@ -59,8 +59,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
//Instantiate the business object handler
|
//Instantiate the business object handler
|
||||||
DashboardViewBiz biz = DashboardViewBiz.GetBiz(ct, HttpContext);
|
DashboardViewBiz biz = DashboardViewBiz.GetBiz(ct, HttpContext);
|
||||||
|
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
//user always has full access to their own dashboard view and can only access their own through api so no need to check
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
// if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||||
|
// return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
if (!ModelState.IsValid)
|
if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
@@ -96,8 +97,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
if (o == null)
|
if (o == null)
|
||||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||||
|
|
||||||
if (!Authorized.HasModifyRole(HttpContext.Items, biz.BizType))
|
//user always has full access to their own dashboard view and can only access their own through api so no need to check
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
// if (!Authorized.HasModifyRole(HttpContext.Items, biz.BizType))
|
||||||
|
// return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user