Skip to content

ADR 020: Everyone on board invites crew

  • Status: Accepted
  • Date: 2026-11-03
  • Deciders: Owner (2026-11-03, with the plan "add a shipmate to the crew directly")
  • Technical Context: apps/server; behaviour in docs/specs/server/sharing.md

Context

Until now only the owner and the crew's skipper could open the Invite crew dialog (ADR 010, its 2026-10-26 amendment with trip roles). On a charter boat the person with the most contacts in the group is often a crew member, not the one whose watch recorded the trip. They had to ask the owner for the link, which was already in their chat anyway.

Decision

  1. A new permission invite_crew in TripRole::PERMISSIONS, held by the owner, the skipper and every crew member. It covers the Invite crew dialog: opening it (which creates a crew link when none works) and "New link".
  2. share keeps public links only (owner and skipper). manage_crew (remove others, make or clear the skipper) stays with owner and skipper.
  3. The same rule for every future way of inviting, such as adding a shipmate directly: inviting is invite_crew, never share or manage_crew.

Consequences

  • A crew member's "New link" ends the crew link the owner sent; people who joined stay. Accepted: the dialog asks first, as for the owner.
  • The crew invitation page still names the owner ("Anna invited you"), also when a crew member created the link; written down as a known deviation in the spec.
  • Quality goals affected: Q3 Access safety: one more role can create a crew link, still only for trips it is on, through Trip.with_permission (ADR 015); the access matrix and role tests cover it. No other goal is affected.