fix(events): scope mappings to source owners #2131

Merged
sam merged 1 commits from fix/events-private-source-mapping-visibility into main 2026-11-26 10:49:48 +00:00
Owner

What

Scope mapping reads and writes to event types whose source the caller may see.

Why

A person-owned source hides its event types from other members, but mapping endpoints queried mappings by organisation and exposed their metadata. The mapping's optional source ID is only a hint; the event type's source is authoritative.

How

Filter mapping lists by caller-visible event types, return 404 for inaccessible mappings, and reject create/update/delete when the event type belongs to another person's source.

Verification

task check passed. The browser check was skipped because no Chrome/Chromium binary is installed. Regression tests were observed failing before the fix and after mutating the visibility guards, and passing with the fix.

## What Scope mapping reads and writes to event types whose source the caller may see. ## Why A person-owned source hides its event types from other members, but mapping endpoints queried mappings by organisation and exposed their metadata. The mapping's optional source ID is only a hint; the event type's source is authoritative. ## How Filter mapping lists by caller-visible event types, return 404 for inaccessible mappings, and reject create/update/delete when the event type belongs to another person's source. ## Verification `task check` passed. The browser check was skipped because no Chrome/Chromium binary is installed. Regression tests were observed failing before the fix and after mutating the visibility guards, and passing with the fix.
sam added 1 commit 2026-11-26 09:38:07 +00:00
fix(events): enforce source ownership for mappings
Quality / check (pull_request) Successful in 10m21s
f0f09e9189
sam merged commit 5dc2d79fdb into main 2026-11-26 10:49:48 +00:00
sam deleted branch fix/events-private-source-mapping-visibility 2026-11-26 10:49:50 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#2131