public async Task <IQueryable <Deployment> > RedeployDeployment( [Required] Guid id, [GlobalState("ClaimsPrincipal")] ClaimsPrincipal user ) { var deploymentAuth = await authorizationService.AuthorizeAsync(user, id, new TenantDeploymentRequirement()); if (deploymentAuth.Failure != null) { throw new UnauthorizedAccessException(); } await deploymentService.Redeploy(id); return(ctxFactiry.CreateDbContext().Deployments.Where(x => x.Id == id)); }