forked from ddrilling/AsbCloudServer
Фиксы
This commit is contained in:
parent
437408d49a
commit
8d051d2089
@ -258,6 +258,10 @@ namespace AsbCloudWebApi.Controllers
|
||||
if (!idUser.HasValue)
|
||||
return false;
|
||||
|
||||
var idCompany = User.GetCompanyId();
|
||||
if (!idCompany.HasValue || !await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, token))
|
||||
return false;
|
||||
|
||||
var well = await wellService.GetOrDefaultAsync(idWell, token);
|
||||
|
||||
if (well is null)
|
||||
|
@ -87,7 +87,7 @@ public class ProcessMapWellboreDevelopmentController : CrudWellRelatedController
|
||||
?? throw new ForbidException($"Скважины с {idWell} не существует");
|
||||
|
||||
var idCompany = User.GetCompanyId();
|
||||
if (idCompany is not null && await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, cancellationToken))
|
||||
if (!idCompany.HasValue || !await wellService.IsCompanyInvolvedInWellAsync(idCompany.Value, idWell, cancellationToken))
|
||||
throw new ForbidException("Нет доступа к скважине");
|
||||
|
||||
if (well.IdState == 2 && !userRepository.HasPermission(idUser, "ProcessMap.editCompletedWell"))
|
||||
|
@ -32,7 +32,7 @@ namespace AsbCloudWebApi.Controllers
|
||||
private readonly IWellOperationImportService wellOperationImportService;
|
||||
private readonly IUserRepository userRepository;
|
||||
|
||||
public WellOperationController(IWellOperationRepository operationService,
|
||||
public WellOperationController(IWellOperationRepository operationRepository,
|
||||
IWellService wellService,
|
||||
IWellOperationImportTemplateService wellOperationImportTemplateService,
|
||||
IWellOperationExportService wellOperationExportService,
|
||||
|
Loading…
Reference in New Issue
Block a user