The error shows ReceptionOfficer is blocked from listing change-of-address cases while you're acting as a registration officer — I'll trace role assignment and the authorization rules for that endpoint.
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Auth/OfficerRole.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/ChangeOfAddress/ChangeOfAddressCaseAuthorization.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Components/Layout/MainLayout.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Auth/CurrentOfficer.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseList.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/NewRegistrationCasePage.razor]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Features/Registration/RoleBoundariesAndCaseLockingTests.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Components/OpenChangeOfAddressDialog.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Journeys/ChangeOfAddressE2ETests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/RegistrationRoleGate.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseDetail.razor]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 6 results in 1 directory]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/IdentityDocuments/DocumentRequestCaseAuthorization.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/IdentityDocuments/Pages/DocumentRequestCaseList.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/RegistrationCaseList.razor]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 1 result in 1 directory]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 2 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Auth/DemoOfficer.cs]
[tool: glob_file_search — Tool use: glob_file_search • Searched codebase "" • 2 results in 1 directory]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Journeys/RoleBoundaryE2ETests.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/NewCaseDialog.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Components/NewCaseDialogResult.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Application/Features/BirthDeclaration/BirthDeclarationCaseAuthorization.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Features/ChangeOfAddress/ChangeOfAddressTests.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseDetail.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/BirthDeclaration/Pages/BirthDeclarationCaseList.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/RegistrationCaseList.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseDetail.razor]
Identified the issue: reception officers are sent to /change-of-address?open=new, but the list page loads cases before the role gate runs. Fixing the reception intake flow and adding role guards on those pages.
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Seeding/E2ECaseSeeder.cs]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Journeys/RegistrationIntakeE2ETests.cs]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/NewRegistrationCasePage.razor]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseList.razor]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/IdentityDocuments/Pages/DocumentRequestCaseList.razor]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/NewRegistrationCasePage.razor]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/ChangeOfAddress/Pages/ChangeOfAddressCaseDetail.razor]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/Registration/Pages/NewRegistrationCasePage.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/IdentityDocuments/Pages/DocumentRequestCaseDetail.razor]
[tool: read_file_v2 — Tool use: read_file_v2 • Read file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Features/Registration/RegistrationTestHelpers.cs]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/src/SchaerbeekMunicipality.Web/Features/IdentityDocuments/Pages/DocumentRequestCaseDetail.razor]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.Integration.Tests/Features/ChangeOfAddress/ChangeOfAddressTests.cs]
[tool: edit_file_v2 — Tool use: edit_file_v2 • Edit file: /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality/tests/SchaerbeekMunicipality.E2E.Tests/Journeys/ChangeOfAddressE2ETests.cs]
[tool: ripgrep_raw_search — Tool use: ripgrep_raw_search]
[tool: run_terminal_command_v2 — Tool use: run_terminal_command_v2 • Run command: cd /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality && dotnet build --no-restore 2>&1 | tail -30]
[tool: run_terminal_command_v2 — Tool use: run_terminal_command_v2 • Run command: cd /Users/[user]/Projects/Private/dotnet/SchaerbeekMunicipality && dotnet test tests/SchaerbeekMunicipality.Integration.Tests --filter "Fully]
The error came from a role mismatch in the intake flow, not from population officers lacking access.
What happened
The stack trace shows role ReceptionOfficer (Jean at the reception desk), not PopulationOfficer (Marie/Anne in the Population Department — the role that manages change-of-address cases).
When you picked “Change of address” on the New case page (/registration/new-case), the app redirected to /change-of-address?open=new. That page immediately called the list API in OnInitializedAsync, but only population officers may list cases. Reception officers may create cases, not browse the list — so the page crashed before the role gate could redirect.
What I fixed
-
Reception intake stays on the new-case page — change-of-address and passport renewal now open their search dialogs inline and show a “Case created” confirmation (same pattern as birth declarations), instead of navigating to population-only list pages.
-
Role guards on list/detail pages — change-of-address and identity-document pages skip API calls when the current role isn’t allowed, so direct URL access redirects cleanly instead of throwing.
How to use it
| Role | How to create a change of address |
|---|
| Reception (Jean) | New case → visit reason “Change of address” → search NR → confirm |
| Population (Marie/Anne) | Sidebar Change of address → New change of address |
If you’re doing full case management (list, edit, confirm), switch to a Population Officer via the role switcher in the top bar.
Reload the app and try again — the reception flow should open the NR search dialog and show a success card without crashing.