Decide: who may see a household event — ListOccurrences and Read disagree #187

Closed
opened 2026-08-23 22:54:05 +00:00 by nalum · 1 comment
Owner

Blocking for the whole calendar redesign. Nothing in the new views or the event card is safe to build until this is settled.

EventService.ListOccurrences applies no membership filter (internal/services/event/occurrences.go): it returns every event in the window — names, locations, attendees — to any authenticated caller, a Guest included (pkg/roles/permissions.go:64). Every other door disagrees. Read (read.go:32), Update, Delete, AddUser, RemoveUser, SplitOccurrence and CancelOccurrence all require event membership, and ListEvents filters to your own (list.go:35).

Both cannot be right about who may see a household event.

A. Household-wide visibility B. Filter the grid
Change Relax Read to household membership Filter ListOccurrences to the caller's events
The grid Everyone's events, all views, as designed Only your own; the who-filter loses its point
Editing Still member-only, so a non-member sheet is read-only Everything you see, you can edit
Joining Needs AddUser to allow self-add Unreachable events cannot be joined
Feels like A family calendar Four private calendars in one app

The handoff recommends A, and A is also the smaller change: the shipped app already behaves that way. The grid is unfiltered today and Calendar.tsx already draws everyone's events with a who-filter over them. A makes Read agree with what the grid has always done; B changes shipped behaviour and removes a working feature.

This is an authorization change either way, so it needs an ADR (the repo rule: auth, schema and service-shape changes get one). The implementation under A is #188.

Whichever way it goes, write it down — the next reader of occurrences.go will otherwise read the missing filter as an oversight and 'fix' it.

**Blocking for the whole calendar redesign.** Nothing in the new views or the event card is safe to build until this is settled. `EventService.ListOccurrences` applies **no membership filter** (`internal/services/event/occurrences.go`): it returns every event in the window — names, locations, attendees — to any authenticated caller, a Guest included (`pkg/roles/permissions.go:64`). Every other door disagrees. `Read` (`read.go:32`), `Update`, `Delete`, `AddUser`, `RemoveUser`, `SplitOccurrence` and `CancelOccurrence` all require event membership, and `ListEvents` filters to your own (`list.go:35`). Both cannot be right about who may see a household event. | | **A. Household-wide visibility** | **B. Filter the grid** | |---|---|---| | Change | Relax `Read` to household membership | Filter `ListOccurrences` to the caller's events | | The grid | Everyone's events, all views, as designed | Only your own; the who-filter loses its point | | Editing | Still member-only, so a non-member sheet is read-only | Everything you see, you can edit | | Joining | Needs `AddUser` to allow self-add | Unreachable events cannot be joined | | Feels like | A family calendar | Four private calendars in one app | **The handoff recommends A**, and A is also the smaller change: the shipped app already behaves that way. The grid is unfiltered today and `Calendar.tsx` already draws everyone's events with a who-filter over them. A makes `Read` agree with what the grid has always done; B changes shipped behaviour and removes a working feature. This is an authorization change either way, so it needs an ADR (the repo rule: auth, schema and service-shape changes get one). The implementation under A is #188. Whichever way it goes, write it down — the next reader of `occurrences.go` will otherwise read the missing filter as an oversight and 'fix' it.
Author
Owner

Everyone can read the calendar and the events on the calendar. Joining an event is open to all (except guest) as well.

Everyone can read the calendar and the events on the calendar. Joining an event is open to all (except guest) as well.
nalum closed this issue 2026-08-24 08:10:16 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
eagraiclainne/app#187
No description provided.