forked from ddrilling/AsbCloudServer
Заменены BadRequest() на Forbid() в контроллерах.
This commit is contained in:
parent
5259a1c730
commit
86f38dfbad
@ -34,7 +34,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
@ -59,7 +59,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
@ -84,7 +84,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
@ -110,7 +110,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
|
@ -52,7 +52,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
bool isCustomerOwnsWell = wellService.CheckWellOwnership((int)idCustomer, wellId);
|
||||
|
||||
|
@ -52,7 +52,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
bool isCustomerOwnsWell = wellService.CheckWellOwnership((int)idCustomer, wellId);
|
||||
|
||||
|
@ -63,7 +63,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
@ -89,7 +89,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
@ -140,7 +140,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
@ -163,7 +163,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
int? idCustomer = User.GetCustomerId();
|
||||
|
||||
if (idCustomer is null)
|
||||
return BadRequest();
|
||||
return Forbid();
|
||||
|
||||
if (!wellService.CheckWellOwnership((int)idCustomer, wellId))
|
||||
return Forbid();
|
||||
|
Loading…
Reference in New Issue
Block a user