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
+6
View File
@@ -10,6 +10,7 @@ import (
"supermarket/internal/appmail"
"supermarket/internal/config"
"supermarket/internal/storage"
"supermarket/internal/users"
)
@@ -19,6 +20,11 @@ func newServerEdition(t *testing.T) (*Server, http.Handler) {
s, h := newTestServer(t, nil)
s.Config = &config.Config{Edition: config.Server}
s.Mail = &appmail.Outbox{}
files, err := storage.Open(config.Storage{Dir: t.TempDir()})
if err != nil {
t.Fatal(err)
}
s.Files = files
return s, h
}