Owners can invite mechanics again; who adds aircraft is an admin setting

- Admin → Settings → Who can add aircraft: administrators only (the
  default) or everyone. Adding an aircraft or importing a .sam.zip makes
  you its Owner, so this decides who can become one.
- A signing invitation from an Owner of the aircraft (or an
  administrator) lets the outside mechanic create an account for the
  invited address again, with a password or by signing in with SSO;
  checked when it's used. Others' signing invitations still need an
  existing account, and say so.
- Docs: who makes accounts, the new setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-15 19:09:49 -05:00
1 parent 19bc3efa19
commit 9a20c91f5e
30 files changed
+219 -40

No files matched your search

+3 -2
View File
@@ -6,7 +6,7 @@ Admins see the **Admin** menu (on a phone, under ☰). Admins can see and edit e
**Users** lists every account.
- **+ New User**: name, email and a starting password. Tick **Administrator** to make them an admin. Then give them a role on aircraft: **Edit** → **Aircraft access** lists their role on every aircraft, to add, change or remove (an aircraft's Owner can also do it from **More → Access & sharing**, and anyone can add their own aircraft).
- **+ New User**: name, email and a starting password. Tick **Administrator** to make them an admin. Then give them a role on aircraft: **Edit** → **Aircraft access** lists their role on every aircraft, to add, change or remove (an aircraft's Owner can also do it from **More → Access & sharing**).
- **Edit** to change details or reset a password when email isn't set up.
- **Locked** marks an account locked for 15 minutes after 10 failed sign-ins in a row (the user is emailed). **Unlock** clears it straight away, once you know it was really them.
- **2FA** marks someone using an authenticator app. **Reset 2FA** turns it off for a user who lost their phone and recovery codes. Confirm it's really them first (call them); they can then set it up again.
@@ -28,7 +28,7 @@ To give someone a role on any aircraft, open them in **Admin → Users**: **Airc
## Invitations
**Admin → Invitations → New invitation** makes a link someone opens to create their own account (or accept with the one they have) and get roles on aircraft. New accounts are only ever made by an administrator: here, from **Users**, or by an administrator's invitation (invitations from an aircraft's Access page are for people who already have an account, and so are signing invitations). An invitation has a label for you, optionally an email address (then only that address can use it, and the link is emailed to it when email is set up) and a name, how many times it works (empty for unlimited, e.g. for a flying club), when it expires (empty for never), and a role on any of the aircraft (none at all gives just an account). The link is shown once, when it's made; copy it then.
**Admin → Invitations → New invitation** makes a link someone opens to create their own account (or accept with the one they have) and get roles on aircraft. New accounts are made by an administrator (here, or from **Users**), by an administrator's invitation, or by an outside mechanic from an Owner's signing invitation (**Ask someone to sign**). Invitations from an aircraft's Access page are for people who already have an account. Since Owners can bring in mechanics, **Settings → Who can add aircraft** decides who can become one. An invitation has a label for you, optionally an email address (then only that address can use it, and the link is emailed to it when email is set up) and a name, how many times it works (empty for unlimited, e.g. for a flying club), when it expires (empty for never), and a role on any of the aircraft (none at all gives just an account). The link is shown once, when it's made; copy it then.
Where someone already has a role on an aircraft, an invitation leaves it as it is. An invitation never gives more than whoever made it can give when it's used. **Revoke** stops a link working; people who already used it keep their access. With single sign-on, **Continue with** on the invitation page signs them in and makes their account. `OIDC_AUTO_CREATE_USERS=true` in the server's settings instead gives an account to anyone the provider lets in, without an invitation; leave it off to keep accounts to administrators and their invitations.
@@ -61,6 +61,7 @@ If single sign-on is broken and `PASSWORD_LOGIN=false` is set, remove that setti
- **Uploads**: the largest file anyone can upload. A proxy in front of the app may have its own smaller limit.
- **Backups**: how many nightly database copies to keep, on the server and in Google Drive.
- **Who can add aircraft**: administrators only (the default), or everyone. Adding an aircraft, or importing a .sam.zip, makes you its Owner, and an Owner's signing invitations let outside mechanics make their own account; with administrators only, you add each aircraft and give it its Owners.
- **Document search**: read scanned documents with Tesseract (free, on the server) or Claude (better on handwriting, needs `ANTHROPIC_API_KEY`, costs API credit). PDFs with text are read directly either way.
## About
+1 -1
View File
@@ -123,7 +123,7 @@ POST /api/v1/aircraft/12/draft_batches
- **One entry per logbook.** Items are grouped by `log` (`AC`, `ENG`, `PROP` or `OTHER`) into one unsigned entry each, their texts in order, so a visit that touched the engine and the airframe makes two entries, signed one after the other.
- **Inspections** (`completes_inspections`): each needs its `result`, `approved` (airworthy) or `discrepancies` (a list was given to the owner), and the draft needs `aircraft_hours`. The entry recording it is an inspection entry, in the logbook named by `log`, else the airframe log if an item is for it.
- **Nothing is resolved until it's signed.** The squawks the items resolve and the inspections they complete are held until **every** entry of the draft is signed; then they're resolved and recorded, attributed to the person who signed last, and linked to the entry that described the work. A draft never clears a squawk on its own. The signer sees what signing will do before they sign.
- **The signer.** Anyone with access to the aircraft and a certificate in their profile can sign, from each entry's `sign_url`. Give `signer.email` for someone else (a mechanic who isn't on the aircraft): each entry then gets an `invitation_url`, a link that lets that person sign that entry with their account for that address, for 14 days. They need an account first (the administrator adds it, or invites them). Pass the link on yourself (for example inside Redmine), or set `send_email: true` to have SAM email it.
- **The signer.** Anyone with access to the aircraft and a certificate in their profile can sign, from each entry's `sign_url`. Give `signer.email` for someone else (a mechanic who isn't on the aircraft): each entry then gets an `invitation_url`, a link that lets that person sign that entry with their account for that address, for 14 days. When the integration acts for an Owner of the aircraft, the link also lets them create that account; otherwise they need one first. Pass the link on yourself (for example inside Redmine), or set `send_email: true` to have SAM email it.
The answer (`201`):
+1 -1
View File
@@ -30,7 +30,7 @@ What you can do depends on your role on each aircraft. These are the built-in ro
| Correct or delete any flight, imports, exports, restore from history | | | | ✓ |
| Edit the aircraft, manage people and share links | | | | ✓ |
Administrators can do everything on every aircraft, and manage users, roles, settings, procedures and audits for the whole app. Anyone can add an aircraft and becomes its Owner. You only see aircraft you have a role on; administrators see all of them.
Administrators can do everything on every aircraft, and manage users, roles, settings, procedures and audits for the whole app. Whoever adds an aircraft becomes its Owner; the administrator decides who can (Admin → Settings: administrators only, or everyone). You only see aircraft you have a role on; administrators see all of them.
## Finding your way around
+1 -1
View File
@@ -21,7 +21,7 @@ A signed entry can't be edited or deleted. Open it and choose **More → Correct
## Someone else did the work
The owner can choose **More → Ask someone to sign** on the entry. The mechanic gets a one-time email link (valid for 14 days), signs in with their own account (the administrator adds it first, or invites them), adds their certificate and signs.
The owner can choose **More → Ask someone to sign** on the entry. The mechanic gets a one-time email link (valid for 14 days), signs in with their own account (or creates one for that address, when an Owner sent the invitation), adds their certificate and signs.
If they prefer paper, print the entry (**Print for logbook**), have it signed in ink, and keep the paper with the logbooks (scan it into Documents).