SAM_VIEWER=true (set only by the records package's
viewer/docker-compose.yml) makes the app a read-only copy of an archive,
for whoever receives the records: `docker compose up`, then open
http://localhost:3000.
- At start (bin/docker-entrypoint → sam:viewer:prepare) the package's
.sam.zip, mounted read-only, is imported once.
- No sign-in: everyone browses as a built-in account. Nothing can be
changed: any request but GET/HEAD is refused, no role permission
applies (so no edit buttons), and there's no sign-out or profile. A
banner names the archive and when it was exported.
- It refuses to start, and every page answers 503, when the database
has any other account, so turning it on for a real installation stops
the app instead of exposing its records.
- The viewer listens on 127.0.0.1 only, and skips scheduled jobs
(reminders, backups, AD searches).
- Docs: the package README (three steps now), Access & sharing, README
settings and features, the suggested recordkeeping procedures.
Checked end to end with a built image and a real records package: the
archive imported at start, pages browsed without an account, a change
refused, and the container refusing to start once an account existed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since invitations from an aircraft's Access page only worked for existing
accounts, they did almost what "Add by email" does. The Access page keeps
adding people by email; new people come through the administrator (Admin
→ Users or Admin → Invitations), and outside mechanics through an Owner's
signing invitation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Anyone can add an aircraft and so manage its people, so invitations from
non-administrators could bring in new accounts without an administrator.
- An invitation makes a new account only if whoever made it is still an
administrator when it's used; an aircraft's Access page invitations are
for people who already have an account (its welcome page says so).
- Signing invitations no longer make accounts: the mechanic needs one
first, and the owner is told when they don't have one.
- With SSO, "Continue with <provider>" on an administrator's invitation
makes the account and accepts the invitation (only for its address when
it has one), so invitations work without OIDC_AUTO_CREATE_USERS. That
setting stays, documented as giving accounts without an invitation; the
Authentik example now leaves it off.
- Docs: who makes accounts (guide, README, Authentik, .env.example, API).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from the original (InvitationCode), adapted to configurable roles.
- Admin → Invitations: a label, optionally one email address (only it can
use the link, and it's emailed) and a name, how many uses (or
unlimited), an expiry (or never), and a role on any aircraft (or none,
for an account only).
- An aircraft's Access page: whoever manages its people invites to that
aircraft, with only the roles they can give; they see and revoke its
invitations.
- /join/<code>: shows what it gives; create an account (when password
sign-in is on) or sign in, then accept. Existing accounts and SSO users
accept too. A role someone already has on an aircraft stays.
- Roles are given as the invitation's creator (AircraftAccess), and only
while they can still manage that aircraft's people. Codes are kept as
digests and shown once; uses are counted under a lock; account creation
and accepting are rate-limited; any invalid link gets the same answer.
- Docs: guide (Administration, Access & sharing), README, and why /join
isn't on the Authentik bypass list. The README's not-yet-ported list
now names Prometheus metrics, and no longer claims oil analysis import
as new.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- User guide: the connection status (red top bar, the ring), a weak
signal counting as none for flights and squawks, the offline page for
any other page, PDFs on phones, the activity log loading as you scroll,
What's new on About, Aircraft access on Admin → Users, and grounding
squawks notifying everyone on the aircraft.
- README: the configurable roles table, feature rows for phones and
offline and the REST API, and rows that said "Owners can…".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What people can do on an aircraft now comes from their role there, and
administrators set what each role allows (Admin → Roles).
- Roles are installation-wide sets of permissions (31, grouped as flying,
squawks and notes, maintenance records, imports and exports, the
aircraft, notifications). Seeing an aircraft's records needs none.
- Built in: Owner (always every permission, so an aircraft can always be
managed), Mechanic (shop maintenance: logbook, signing, components,
inspections, ADs, squawks, reminders), Pilot (what pilots could do
before) and Viewer (view only). Administrators can change all but
Owner's, and add their own; a role can be deleted once nobody has it.
- Existing owners and pilots keep exactly what they could do.
- Admin → Users → a user lists their role on every aircraft, to change,
remove or add. On the aircraft's Access page, anyone who manages people
hands out roles, but only an Owner can give or take away Owner, nobody
changes their own (except administrators), and an aircraft always
keeps an Owner (AircraftAccess).
- Controllers declare the permission each action needs; a request that
changes something with none declared is refused (and raises in
development and tests), and a test walks every route to check.
- Weekly reminders and overdue alerts go to roles that get reminders;
the DRS reminder also needs Manage ADs. The API follows the person's
role; its owners_only error is now not_permitted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- more_menu helper (menu / menu-item styles): each section keeps its main
action as a button; imports, exports, printing and tools move under More
(flights, logbook, logbook entry, documents, inspections, fleet)
- Aircraft header: More with status report and, for owners, access &
sharing, edit, .sam.zip and records package; Access & Sharing and Oil
Analysis tabs removed (oil analysis is under Oil & Fuel with a switch)
- Logbook: Print selected appears once an entry is ticked; filters apply on
change; dates use fmt_date (also AirTrail, notes, audits, About)
- Header shows the role on the aircraft and hides the usual Available badge;
no second Grounded badge on the Overview; AD DRS import listed once
- Flights: stat cards 2x2 on phones; By year opens visibly, only with more
than one year; duplicate + Log Flight removed
- Remove unused hello_controller.js; guide and README updated
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The viewer compose uses the published image (from docker-compose.image.yml)
and a throwaway secret key, plain HTTP on localhost.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 16 Markdown pages covering every area for pilots, owners, mechanics
and admins, readable on GitHub
- /help renders them with a page list; links between pages work in both
places; only listed pages can be opened
- The electronic records instructions (AC 120-78B user instructions) are
now the guide's records page, also used as the procedures appendix
- Help link in the main menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>