case 1690

This commit is contained in:
2021-11-24 23:04:12 +00:00
parent 492430bb8c
commit fcfd09a909
2 changed files with 3 additions and 5 deletions

View File

@@ -75,10 +75,8 @@ namespace AyaNova.Api.Controllers
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
UnitBiz biz = UnitBiz.GetBiz(ct, HttpContext);
var customerEffectiveRights = await UserBiz.CustomerUserEffectiveRightsAsync(biz.UserId);
if (!customerEffectiveRights.CreateUnit)
{
return StatusCode(403, new ApiNotAuthorizedResponse());
}
if (!customerEffectiveRights.CreateUnit)
return StatusCode(403, new ApiNotAuthorizedResponse());
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));