Skip to content

Show inquiry download to any logged-in user + add Data-eigenaar field#258

Merged
yorickdewid merged 1 commit into
mainfrom
fix/973-inquiry-download-data-owner
Jun 24, 2026
Merged

Show inquiry download to any logged-in user + add Data-eigenaar field#258
yorickdewid merged 1 commit into
mainfrom
fix/973-inquiry-download-data-owner

Conversation

@yorickdewid

Copy link
Copy Markdown
Contributor

Context

Quick-win slice of Laixer/FunderMaps#973 (data ownership), addressing the two concrete points Don raised in the issue comments. Also related: Laixer/FunderMaps#968 (ownership-agnostic inquiry access — backend already shipped).

This is WebFront-only; no schema or API changes.

What & why

1. Download button now shows for any logged-in user

The button in the Onderzoeksinformatie panel was gated on isOrgAvailable(attribution.owner) — you had to be a member of the report's owning org. Historical data sits under scattered legacy orgs, so this hid the button for almost everyone.

The API already serves /api/inquiry/:id/download ownership-agnostically (#968), so the gate only ever hid a file that was already reachable. No new exposure — this just aligns the UI with what the backend already allows. Now gated on isAuthenticated.

2. "Data-eigenaar" field added to the panel

Wired forward-compatibly through the adapter: reads attribution_data_owner_name when the API exposes it, otherwise falls back to the owning org. Today it shows the owning organisation (the de-facto data owner); once report.inquiry.data_owner_organization_id ships in the epic, the adapter auto-picks up the corrected value — no further frontend change needed.

Heads-up — access-rule decision

This deliberately softens #973's "only the owning org may download" to #968's "any logged-in user." That choice is what actually unblocks Don now; proper owner-gating only becomes meaningful after the backfill corrects who the owner is, and belongs in the data_owner_organization_id epic. Code comments note this.

Test

  • npx vue-tsc --noEmit — clean.
  • Not yet eyeballed live in pnpm dev.

🤖 Generated with Claude Code

… (#973)

The download button in the Onderzoeksinformatie panel was gated on
isOrgAvailable(attribution.owner) — the user had to be a member of the
report's owning org. Historical data sits under scattered legacy orgs, so
this hid the button for almost everyone. The API already serves
/api/inquiry/:id/download ownership-agnostically (#968), so the gate only
hid a file that was already reachable. Gate on isAuthenticated instead.

Also surface the requested "Data-eigenaar" field in the panel. It is wired
forward-compatibly through the adapter: it reads attribution_data_owner_name
when the API exposes it, otherwise falls back to the owning org. Repoint the
source once report.inquiry.data_owner_organization_id ships (#973 epic).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yorickdewid yorickdewid merged commit 25f3e14 into main Jun 24, 2026
4 checks passed
@yorickdewid yorickdewid deleted the fix/973-inquiry-download-data-owner branch June 24, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants