tests fixes and sprints work

This commit is contained in:
master
2026-01-22 19:08:46 +02:00
parent c32fff8f86
commit 726d70dc7f
881 changed files with 134434 additions and 6228 deletions

View File

@@ -85,8 +85,8 @@ internal static class EffectivePolicyEndpoints
private static IResult CreateEffectivePolicy(
HttpContext context,
[FromBody] CreateEffectivePolicyRequest request,
EffectivePolicyService policyService,
IEffectivePolicyAuditor auditor)
[FromServices] EffectivePolicyService policyService,
[FromServices] IEffectivePolicyAuditor auditor)
{
var scopeResult = RequireEffectiveWriteScope(context);
if (scopeResult is not null)
@@ -120,7 +120,7 @@ internal static class EffectivePolicyEndpoints
private static IResult GetEffectivePolicy(
HttpContext context,
[FromRoute] string effectivePolicyId,
EffectivePolicyService policyService)
[FromServices] EffectivePolicyService policyService)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyRead);
if (scopeResult is not null)
@@ -144,8 +144,8 @@ internal static class EffectivePolicyEndpoints
HttpContext context,
[FromRoute] string effectivePolicyId,
[FromBody] UpdateEffectivePolicyRequest request,
EffectivePolicyService policyService,
IEffectivePolicyAuditor auditor)
[FromServices] EffectivePolicyService policyService,
[FromServices] IEffectivePolicyAuditor auditor)
{
var scopeResult = RequireEffectiveWriteScope(context);
if (scopeResult is not null)
@@ -178,8 +178,8 @@ internal static class EffectivePolicyEndpoints
private static IResult DeleteEffectivePolicy(
HttpContext context,
[FromRoute] string effectivePolicyId,
EffectivePolicyService policyService,
IEffectivePolicyAuditor auditor)
[FromServices] EffectivePolicyService policyService,
[FromServices] IEffectivePolicyAuditor auditor)
{
var scopeResult = RequireEffectiveWriteScope(context);
if (scopeResult is not null)
@@ -232,8 +232,8 @@ internal static class EffectivePolicyEndpoints
private static IResult AttachScope(
HttpContext context,
[FromBody] AttachAuthorityScopeRequest request,
EffectivePolicyService policyService,
IEffectivePolicyAuditor auditor)
[FromServices] EffectivePolicyService policyService,
[FromServices] IEffectivePolicyAuditor auditor)
{
var scopeResult = RequireEffectiveWriteScope(context);
if (scopeResult is not null)
@@ -268,8 +268,8 @@ internal static class EffectivePolicyEndpoints
private static IResult DetachScope(
HttpContext context,
[FromRoute] string attachmentId,
EffectivePolicyService policyService,
IEffectivePolicyAuditor auditor)
[FromServices] EffectivePolicyService policyService,
[FromServices] IEffectivePolicyAuditor auditor)
{
var scopeResult = RequireEffectiveWriteScope(context);
if (scopeResult is not null)
@@ -294,7 +294,7 @@ internal static class EffectivePolicyEndpoints
private static IResult GetPolicyScopeAttachments(
HttpContext context,
[FromRoute] string effectivePolicyId,
EffectivePolicyService policyService)
[FromServices] EffectivePolicyService policyService)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyRead);
if (scopeResult is not null)
@@ -311,7 +311,7 @@ internal static class EffectivePolicyEndpoints
HttpContext context,
[FromQuery] string subject,
[FromQuery] string? tenantId,
EffectivePolicyService policyService)
[FromServices] EffectivePolicyService policyService)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyRead);
if (scopeResult is not null)

View File

@@ -59,8 +59,8 @@ internal static class PolicyPackEndpoints
private static async Task<IResult> CreatePack(
HttpContext context,
[FromBody] CreatePolicyPackRequest request,
IPolicyPackRepository repository,
IGuidProvider guidProvider,
[FromServices] IPolicyPackRepository repository,
[FromServices] IGuidProvider guidProvider,
CancellationToken cancellationToken)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyEdit);
@@ -90,7 +90,7 @@ internal static class PolicyPackEndpoints
private static async Task<IResult> ListPacks(
HttpContext context,
IPolicyPackRepository repository,
[FromServices] IPolicyPackRepository repository,
CancellationToken cancellationToken)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyRead);
@@ -108,8 +108,8 @@ internal static class PolicyPackEndpoints
HttpContext context,
[FromRoute] string packId,
[FromBody] CreatePolicyRevisionRequest request,
IPolicyPackRepository repository,
IPolicyActivationSettings activationSettings,
[FromServices] IPolicyPackRepository repository,
[FromServices] IPolicyActivationSettings activationSettings,
CancellationToken cancellationToken)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyEdit);
@@ -157,9 +157,9 @@ internal static class PolicyPackEndpoints
[FromRoute] string packId,
[FromRoute] int version,
[FromBody] ActivatePolicyRevisionRequest request,
IPolicyPackRepository repository,
IPolicyActivationAuditor auditor,
TimeProvider timeProvider,
[FromServices] IPolicyPackRepository repository,
[FromServices] IPolicyActivationAuditor auditor,
[FromServices] TimeProvider timeProvider,
CancellationToken cancellationToken)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyActivate);

View File

@@ -145,9 +145,9 @@ internal static class ProfileExportEndpoints
private static IResult ImportProfiles(
HttpContext context,
[FromBody] ImportProfilesRequest request,
RiskProfileConfigurationService profileService,
ProfileExportService exportService,
ICryptoHash cryptoHash)
[FromServices] RiskProfileConfigurationService profileService,
[FromServices] ProfileExportService exportService,
[FromServices] ICryptoHash cryptoHash)
{
var scopeResult = ScopeAuthorization.RequireScope(context, StellaOpsScopes.PolicyEdit);
if (scopeResult is not null)