This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user