Phase 10, part 4: inviting users, and what admins can change

Settings → Users lists everyone with their access and status. Admins
invite people by email (a link for 7 days), as admins or as members with
modules each to view or edit; the invitation's page sets the password,
profile and emails wanted. Admins can resend or withdraw invitations,
change access, turn accounts off and on, unlock, reset two-factor, sign
someone out, and remove them; never the owner, nor themselves. Your
account gets the emails wanted and a photo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 09:07:32 -07:00
co-authored by Claude Opus 5.5
parent 8040512a18
commit 47a504b7b2
18 changed files with 1220 additions and 15 deletions
+24
View File
@@ -2239,6 +2239,30 @@ starts** (multi-tenant still doesn't).
- Sign-ins, failures, locks, resets and two-factor changes are logged;
they move to the audit log in part 8.
**Part 4 built 2026-11-25** on `phase10`.
- Settings → Users (admins only; a member gets the 403 page): everyone,
with their access (*Admin*, or *SEO, Metrics (view)*), status (active,
invited until when, invitation expired, locked, turned off, two-factor)
and last sign-in. *Invite someone*: email, name, and *Admin* or *Member*
with each module (Content, Prospects, SEO, Sites, Metrics, the Market)
as no access, view or edit. A member needs at least one module.
- The invitation is emailed with a link (7 days, once). `/invite/<token>`
asks for the name, title, time zone, a password twice, and the emails
they want, of those their modules allow (the SEO morning check, the SEO
Monday report; part 5 sends them to the people who chose them). Joining
signs them in.
- One user's page: their access; send the invitation again (a new link
replaces the old) or withdraw it (the account goes); turn the account
off (signed out, links withdrawn) or back on (re-invited if they never
joined); unlock; sign them out everywhere; reset two-factor (off, and
signed out); remove. Losing a module drops its emails. The owner's
account and your own can't be changed there.
- Your account also has the emails wanted, and a photo (2 MB, PNG, JPEG,
WebP or GIF, checked by content), kept in the file storage under
`photos/`, shown at `/users/<id>/photo` to people signed in. The photo
is on Your account rather than the invitation page, to keep joining to
one plain form.
1. **Users and sessions.**
- Tables:
- `users`: email, name, kind (person or agent), status (invited,