feat(acl): resolve the zaaktype by identificatie, not a pinned URL (S-27, closes #113) #118

Merged
not merged 5 commits from feat/113-acl-zaaktype-by-identificatie into main 2026-07-22 14:49:27 +00:00
2 changed files with 17 additions and 3 deletions
Showing only changes of commit f363cb1663 - Show all commits
+6 -3
View File
@@ -29,9 +29,12 @@ public sealed class EenZaakOpenenSteps
Bronorganisatie = values["bronorganisatie"],
VerantwoordelijkeOrganisatie = values["verantwoordelijkeOrganisatie"],
Vertrouwelijkheidaanduiding = values["vertrouwelijkheidaanduiding"],
ZaaktypeUrl = new Uri(values["zaaktype"]),
InformatieobjecttypeUrl = new Uri("http://openzaak/catalogi/api/v1/informatieobjecttypen/dip"),
ZaaktypeIdentificatie = "BIG-REGISTRATIE",
InformatieobjecttypeOmschrijving = "Diploma",
};
// The ACL resolves the zaaktype by identificatie (S-27); the scenario's zaaktype URL is what
// the catalogus resolves it to, so the created zaak still carries that URL.
_gateway.ResolvedZaaktypeUrl = new Uri(values["zaaktype"]);
}
[Given("today is \"(.*)\"")]
@@ -41,7 +44,7 @@ public sealed class EenZaakOpenenSteps
[When("the domain asks the ACL to open a zaak")]
public async Task WhenTheDomainAsksTheAclToOpenAZaak()
{
var service = new AclService(_gateway, _defaults!, new FixedClock(_today));
var service = new AclService(_gateway, _defaults!, new CachedZaaktypeCatalog(_gateway, _defaults!), new FixedClock(_today));
_returnedUrl = await service.OpenZaakAsync(_registration!);
}
@@ -14,6 +14,11 @@ public sealed class InMemoryZaakGateway : IZaakGateway
public (Uri Zaak, Uri Zaaktype, DateOnly Datum)? Approved { get; private set; }
public (Uri Zaak, Uri Zaaktype, DateOnly Datum)? Cancelled { get; private set; }
// The URLs the catalogus resolves the configured identificatie/omschrijving to (S-27); settable so
// a scenario can pin the zaaktype the ACL should default-fill.
public Uri ResolvedZaaktypeUrl { get; set; } = new("http://openzaak/catalogi/api/v1/zaaktypen/big");
public Uri ResolvedInformatieobjecttypeUrl { get; set; } = new("http://openzaak/catalogi/api/v1/informatieobjecttypen/dip");
public Task<Uri> OpenZaakAsync(ZaakRequest request, CancellationToken ct = default)
{
Captured = request;
@@ -37,4 +42,10 @@ public sealed class InMemoryZaakGateway : IZaakGateway
public Task<Uri> StoreDocumentAsync(DocumentRequest request, CancellationToken ct = default)
=> Task.FromResult(new Uri("http://openzaak/documenten/api/v1/enkelvoudiginformatieobjecten/acc-doc"));
public Task<Uri> ResolveZaaktypeUrlAsync(string identificatie, CancellationToken ct = default)
=> Task.FromResult(ResolvedZaaktypeUrl);
public Task<Uri> ResolveInformatieobjecttypeUrlAsync(string omschrijving, CancellationToken ct = default)
=> Task.FromResult(ResolvedInformatieobjecttypeUrl);
}