This commit is contained in:
2020-05-07 22:16:03 +00:00
parent a12065e8f3
commit 80a43b1576
3 changed files with 224 additions and 38 deletions

View File

@@ -145,6 +145,7 @@ namespace AyaNova.Api.Controllers
// NOTE: HERE would be the second check of biz rules before returning the object
// in cases where there is also a business rule to affect retrieval on top of basic rights
//NO, NOT HERE, in biz object surely?
return Ok(ApiOkResponse.Response(o, !Authorized.HasModifyRole(HttpContext.Items, biz.BizType)));
}
@@ -177,6 +178,7 @@ namespace AyaNova.Api.Controllers
if (!Authorized.HasModifyRole(HttpContext.Items, biz.BizType))
return StatusCode(403, new ApiNotAuthorizedResponse());
biz.PutAsync(id, updatedObject);
//todo: handle concurrency in biz object, what to do?
// var o = await biz.PutAsync(id, updatedObject);