feat: login page says a locked instance is suspended instead of drawing the form
This commit is contained in:
@@ -1002,9 +1002,13 @@ plane, each of which this codebase enforces:
|
||||
- **Disputes lock and purge instances.** HQ writes `instances.locked_at` when
|
||||
an account is disputed and `instances.purge_after` only once the dispute
|
||||
fails. `services.InstanceLocked` (60s cache) refuses sessions, API tokens
|
||||
and agents on a locked instance, and `GetInstanceBySlug` hides it from the
|
||||
host resolver. The check in `auth.Middleware` is explicit because the host
|
||||
guard only runs when a host resolves. `ReapTerminatedInstances` purges once
|
||||
and agents on a locked instance, and `InstanceForHost` and `SoleInstance`
|
||||
resolve it to nothing. The check in `auth.Middleware` is explicit because the
|
||||
host guard only runs when a host resolves. `HostLocked` is the one place that
|
||||
tells "locked" from "unknown", so the login page can say access is suspended
|
||||
rather than draw a form; `resolveLoginInstance` refuses a locked instance on
|
||||
the single-instance fallback too, which otherwise served its sign-in page.
|
||||
A locked instance's public status page stays an ordinary 404. `ReapTerminatedInstances` purges once
|
||||
both fields are present and `purge_after` has passed, independent of
|
||||
`FREE_INSTANCE_REAP_AFTER`, and `ReapFreeInstances` skips locked instances
|
||||
so a restore finds them intact.
|
||||
|
||||
Reference in New Issue
Block a user