EventService: household-wide event visibility and self-add #188
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#188
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?
Implements option A of #187, and lands only if that decision goes A.
Two changes, both in
internal/services/event/:Read— relaxsvc.RequireEventMember(read.go:32) to household membership, so a member may open any event on the shared calendar. The grid already shows them; today tapping one and reading it is refused, which is the inconsistency #187 is about.AddUser— allow a household member to add themselves (adduser.go:36). Adding anyone else stays member-only. Without this nobody but an admin can join an event, so "I'm going" is unbuildable and a parent cannot put themselves on the school run.Everything else stays as it is:
Update,Delete,RemoveUser,SplitOccurrenceandCancelOccurrenceremain member-only, andListEventskeeps filtering to your own.Needs the ADR from #187, integration coverage for the auth-critical paths (the repo rule for auth flows), and a note in the permission matrix commentary so the guard's new shape is discoverable.
Update — #187 is closed, and this is what it decided
So, concretely:
Read— dropsvc.RequireEventMember(internal/services/event/read.go:32).The permission matrix already admits Admin, Member, Child and Guest, and that
role gate becomes the whole check. The grid has always returned every event;
this makes opening one agree with seeing it.
AddUser— allow a caller to add themselves to any event(
adduser.go:36). Adding anyone else stays member-only. The matrix admitsAdmin, Member and Child for
AddUserand not Guest, so "open to all exceptguest" needs no matrix change — only the resource guard moves.
Everything else keeps its member guard:
Update,Delete,RemoveUser,SplitOccurrence,CancelOccurrence, andListEventskeeps filtering to yourown.
This is an authorization change, so it needs an ADR and integration coverage —
including the negative cases: a Guest may read but may not join, and a member may
add themselves but not a third person.
Update — implemented in PR #205 (2026-08-25)
feat/household-visible-calendardelivers this, and ADR-0036 records it. The guard went one step further than the sketch above: attendance and authority split.AddUser/RemoveUsergate onRequireEventJoiner/RequireEventLeaver(self-add and self-remove open to every role the matrix admits), and a self-add writes an ATTENDEE ref — presence with no authority — whileUpdate,Deleteand the occurrence verbs gate onRequireEventOwner(an OWNER ref, or admin).Readdropped its membership guard entirely. Every ref written before the change is an OWNER ref, so no stored event changes meaning.Closes when the PR merges. The updated handoff's newer requirement — an event with no attendees is household-owned — is not part of this change and has its own issue, #257.