## What & why S-15a, the first of the S-15 (#16) split. A new **beheer** portal (medewerker realm, like behandel) shows the ZTC catalogus — the published zaaktypen — **read-only**. A beheerder logs in and sees the seeded BIG-REGISTRATIE zaaktype. Closes #130 ### The vertical portal → BFF `GET /beheer/catalogi/zaaktypen` (medewerker realm + `beheerder` role) → ACL `GET /catalogi/zaaktypen` → ZGW Catalogi API. - **ACL**: new read-only `GET /catalogi/zaaktypen` listing published zaaktypen (reuses the ADR-0021 Catalogi client; public-safe `identificatie`/`omschrijving`). - **BFF**: new typed `IAclClient` + `Downstream:Acl:BaseUrl`, and `GET /beheer/catalogi/zaaktypen` behind a new `beheerder` policy (reuses the medewerker bearer scheme + realm-role lifting). OpenAPI spec + generated Angular client regenerated. - **Keycloak**: `beheerder` realm role + `bram-beheerder` test user in the medewerker realm. - **Frontend**: new `apps/beheer` Angular app (copied from behandel) with a read-only catalogus page; `SECURE_API_ROUTES=['/beheer/']`. - **Infra**: `beheer` compose service (port 8143), added to `WAIT_SVCS` + CI log-dump; a Playwright e2e (beheerder login → catalogus shows BIG-REGISTRATIE). ### New boundary → ADR-0025 The BFF now reaches the **ACL directly** for the catalogus read — a new service-to-service edge (§14). The catalogus is neither a domain nor a projection concern, and §8.1 means only the ACL may read ZGW; routing through the domain would pollute it with a non-domain passthrough. §8.1/§8.3 stay intact. Recorded in **ADR-0025**. ## Definition of Done - [x] Failing test committed before each implementation (red→green per layer: ACL, BFF, frontend). - [x] Conventional Commits referencing #130. - [ ] CI green — pending Gitea Actions run. - [x] `docker compose up` brings up `beheer` (health-gated in `WAIT_SVCS`). - [x] Docs — ADR-0025 + demo-script S-15a note. - [x] Demo note in `docs/demo-script.md`. ## Verified locally lint (`dotnet format`) ✓ · .NET unit (Acl 57 / Big 152 / EventSubscriber 19 / Bff 40) ✓ · frontend lint+test (8 projects) ✓ · frontend build (4 apps) ✓. Mutation ratchet: added a gateway unit test for the new `ListZaaktypenAsync` mapping so the ACL score holds. verify-stack (compose smoke + e2e) runs in CI. ## Notes for reviewers - The BFF drops the ZGW URL from `BeheerZaaktype` (public-safe: identificatie + omschrijving only). - The catalogus e2e asserts on the stable seeded `BIG-REGISTRATIE` (not a per-test reference), safe on the shared verify stack. - Follow-ups: **S-15b** (#131) default-fill CRUD, **S-15c** (#132) medewerker-realm MFA. 🤖 Generated with [Claude Code](https://claude.com/claude-code)Reviewed-on: #133
48 lines
2.9 KiB
C#
48 lines
2.9 KiB
C#
namespace Acl.Application;
|
|
|
|
/// <summary>Port to the ZGW Zaken API. Implemented in Infrastructure — the only
|
|
/// code that talks to OpenZaak (ADR-0001).</summary>
|
|
public interface IZaakGateway
|
|
{
|
|
Task<Uri> OpenZaakAsync(ZaakRequest request, CancellationToken ct = default);
|
|
|
|
/// <summary>
|
|
/// Set the given zaak to the <em>eindstatus</em> (final statustype) of the supplied zaaktype —
|
|
/// the ZGW translation of "approve". The gateway resolves which statustype is the eindstatus from
|
|
/// the catalogus and POSTs a status against the zaak, dated <paramref name="datumStatusGezet"/>.
|
|
/// </summary>
|
|
Task SetZaakToEindstatusAsync(Uri zaakUrl, Uri zaaktypeUrl, DateOnly datumStatusGezet, CancellationToken ct = default);
|
|
|
|
/// <summary>
|
|
/// Set the given zaak to the <em>cancellation</em> statustype ("Geannuleerd") and record the
|
|
/// matching cancellation resultaat ("Vervallen") — the ZGW translation of "the 30-day document term
|
|
/// lapsed" (S-10c). Distinct from <see cref="SetZaakToEindstatusAsync"/> (approval): the gateway
|
|
/// resolves both the cancellation statustype and resultaattype from the catalogus by their
|
|
/// omschrijving, POSTs the resultaat then the status, dated <paramref name="datumStatusGezet"/>.
|
|
/// </summary>
|
|
Task SetZaakToCancellationStatusAsync(Uri zaakUrl, Uri zaaktypeUrl, DateOnly datumStatusGezet, CancellationToken ct = default);
|
|
|
|
/// <summary>Read the zaak's <c>identificatie</c> — the public-safe reference the register shows.
|
|
/// The Event Subscriber calls this through the ACL rather than reading ZGW itself (§8.1, #78).</summary>
|
|
Task<string> GetZaakIdentificatieAsync(Uri zaakUrl, CancellationToken ct = default);
|
|
|
|
/// <summary>
|
|
/// Store a diploma document (S-10b): create an <c>enkelvoudiginformatieobject</c> in the ZGW
|
|
/// Documenten API and relate it to the zaak via a <c>zaakinformatieobject</c>. Returns the URL of
|
|
/// the created informatieobject.
|
|
/// </summary>
|
|
Task<Uri> StoreDocumentAsync(DocumentRequest request, CancellationToken ct = default);
|
|
|
|
/// <summary>Resolve the URL of the published zaaktype with the given <paramref name="identificatie"/>
|
|
/// from the Catalogi API (S-27). Throws if no published zaaktype matches.</summary>
|
|
Task<Uri> ResolveZaaktypeUrlAsync(string identificatie, CancellationToken ct = default);
|
|
|
|
/// <summary>Resolve the URL of the published informatieobjecttype with the given
|
|
/// <paramref name="omschrijving"/> from the Catalogi API (S-27). Throws if none matches.</summary>
|
|
Task<Uri> ResolveInformatieobjecttypeUrlAsync(string omschrijving, CancellationToken ct = default);
|
|
|
|
/// <summary>List the published zaaktypen from the Catalogi API — the read-only catalogus the beheer
|
|
/// portal shows (S-15a). The ACL is the only code allowed to read ZGW (§8.1).</summary>
|
|
Task<IReadOnlyList<ZaaktypeSummary>> ListZaaktypenAsync(CancellationToken ct = default);
|
|
}
|