Decide: who may see a household event — ListOccurrences and Read disagree #187
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app#187
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blocking for the whole calendar redesign. Nothing in the new views or the event card is safe to build until this is settled.
EventService.ListOccurrencesapplies 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,SplitOccurrenceandCancelOccurrenceall require event membership, andListEventsfilters to your own (list.go:35).Both cannot be right about who may see a household event.
Readto household membershipListOccurrencesto the caller's eventsAddUserto allow self-addThe handoff recommends A, and A is also the smaller change: the shipped app already behaves that way. The grid is unfiltered today and
Calendar.tsxalready draws everyone's events with a who-filter over them. A makesReadagree 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.gowill otherwise read the missing filter as an oversight and 'fix' it.Everyone can read the calendar and the events on the calendar. Joining an event is open to all (except guest) as well.