feat(base)!: sign-ups as the operator says, waiting accounts, operators (ADR 0021, step 1)
SIGN_UP takes open (unset), approval or closed; anything else stops the server as it starts. Closed refuses a SimpleLogin sign-up before its handle is counted, an address sign-up only once the code has proved the address, so nothing tells whether an address has an account. Approval lets a new account wait, at most ten at once: no session is issued for a waiting or suspended account, only a pass (32 random bytes, kept as its SHA-256, 30 days, five per account) and four BIP-39 words the operator reads out to match it. The pass looks, forgets, and deletes an account that was never approved; nothing else. Operators hold the scope operator, given first by SQL (D32), then named in the app: InstanceOperatorEndpoint lists, approves and refuses waiting accounts, finds accounts, suspends them (ending their sessions), and names and takes back operators, never the last. account.operating() counts the waiting for the badge. Members ask the register (five new operations, a refusal kind signUp), and say closed while it is out of reach. Never-approved accounts go after 14 days in the daily pruning. The migration only adds the tables waiting_account and waiting_pass, so the server before it keeps working on the new schema. BREAKING CHANGE: a register and its members must run this version together: a member asks the register operations an older one doesn't know. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
e2b3344e99
commit
a060fbc21d
2 changed files with 50068 additions and 37 deletions
|
|
@ -11,13 +11,17 @@ import 'package:serverpod/serverpod.dart';
|
|||
/// goes too.
|
||||
class PruningFutureCall extends FutureCall {
|
||||
/// Prunes one batch of anonymous accounts and logs how many people went,
|
||||
/// and forgets the resets that lapsed (ADR 0017).
|
||||
/// forgets the resets that lapsed (ADR 0017), and deletes the new accounts
|
||||
/// left unapproved for 14 days, with the waiting passes past their time
|
||||
/// (ADR 0021, D25).
|
||||
Future<void> pruneAccounts(Session session) async {
|
||||
final now = clock.now();
|
||||
final pruned = await pruneAnonymousPeople(session);
|
||||
final resets = await forgetLapsedResets(session, now: now);
|
||||
final unapproved = await forgetUnapprovedSignUps(session, now: now);
|
||||
session.log(
|
||||
'Pruned $pruned anonymous people and $resets lapsed resets.',
|
||||
'Pruned $pruned anonymous people, $resets lapsed resets and '
|
||||
'$unapproved accounts never approved.',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,9 @@ class FilePruningPruneFilesFutureCall extends _is.FutureCall
|
|||
}
|
||||
|
||||
/// Prunes one batch of anonymous accounts and logs how many people went,
|
||||
/// and forgets the resets that lapsed (ADR 0017).
|
||||
/// forgets the resets that lapsed (ADR 0017), and deletes the new accounts
|
||||
/// left unapproved for 14 days, with the waiting passes past their time
|
||||
/// (ADR 0021, D25).
|
||||
class PruningPruneAccountsFutureCall extends _is.FutureCall
|
||||
implements _is.InvokableFutureCall {
|
||||
@override
|
||||
|
|
|
|||
Loading…
Reference in a new issue