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
+17
View File
@@ -159,6 +159,14 @@ func (s *Server) Handler() (http.Handler, error) {
mux.HandleFunc("POST /settings/account/two-factor", s.twoFactorOn)
mux.HandleFunc("POST /settings/account/two-factor/off", s.twoFactorOff)
mux.HandleFunc("POST /settings/account/recovery-codes", s.recoveryCodes)
mux.HandleFunc("POST /settings/account/photo", s.accountPhoto)
mux.HandleFunc("GET /users/{id}/photo", s.userPhoto)
mux.HandleFunc("GET /settings/users", s.usersPage)
mux.HandleFunc("POST /settings/users", s.userInvite)
mux.HandleFunc("GET /settings/users/{id}", s.userPage)
mux.HandleFunc("POST /settings/users/{id}/{action}", s.userAction)
mux.HandleFunc("GET /invite/{token}", s.invitePage)
mux.HandleFunc("POST /invite/{token}", s.inviteAccept)
mux.HandleFunc("GET /search", s.searchPage)
@@ -635,6 +643,15 @@ var flashes = map[string]string{
"sessions-ended": "Signed out everywhere else.",
"two-factor-off": "Two-factor sign-in is off.",
"codes-low": "You're running out of recovery codes: make new ones below.",
"invited": "Invitation sent.",
"withdrawn": "Invitation withdrawn.",
"disabled": "The account is turned off, and signed out.",
"enabled": "The account is back on.",
"unlocked": "Unlocked.",
"two-factor-reset": "Two-factor sign-in is reset: they sign in with their password, then can turn it on again.",
"signed-out-user": "Signed out everywhere.",
"removed": "Removed.",
"joined": "Welcome to Supermarket.",
"deleted": "Deleted.",
"x-connected": "X is connected.",
"li-connected": "LinkedIn is connected.",