diff --git a/AsbCloudWebApi/Controllers/WellController.cs b/AsbCloudWebApi/Controllers/WellController.cs index 364d0863..85ffea8d 100644 --- a/AsbCloudWebApi/Controllers/WellController.cs +++ b/AsbCloudWebApi/Controllers/WellController.cs @@ -58,7 +58,7 @@ namespace AsbCloudWebApi.Controllers { var idCompany = User.GetCompanyId(); - if (idCompany is null) + if (idCompany is null || !await wellService.IsCompanyInvolvedInWellAsync(idCompany??default, idWell, token).ConfigureAwait(false)) return NoContent(); var well = await wellService.GetAsync(idWell,