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:
@@ -191,16 +191,17 @@ func TestSessions(t *testing.T) {
|
||||
t.Errorf("idle a week: %v", err)
|
||||
}
|
||||
|
||||
// A disabled user's sessions stop working.
|
||||
t3, s3, _ := StartSession(d, u.ID, "", "", now)
|
||||
t4, _, _ := StartSession(d, u.ID, "", "", now)
|
||||
// A disabled user's sessions end.
|
||||
t5, _, _ := StartSession(d, u.ID, "", "", now)
|
||||
if err := SetStatus(d, u.ID, Disabled); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, _, err := Lookup(d, t3, now); !errors.Is(err, ErrNoSession) {
|
||||
SetStatus(d, u.ID, Active)
|
||||
if _, _, err := Lookup(d, t5, now); !errors.Is(err, ErrNoSession) {
|
||||
t.Errorf("disabled user: %v", err)
|
||||
}
|
||||
SetStatus(d, u.ID, Active)
|
||||
t3, s3, _ := StartSession(d, u.ID, "", "", now)
|
||||
t4, _, _ := StartSession(d, u.ID, "", "", now)
|
||||
if list, _ := Sessions(d, u.ID, now); len(list) != 2 {
|
||||
t.Errorf("sessions: %d", len(list))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user