feat: recorded import grants, unclaimed creators and claiming (#15)
Co-authored-by: dhkatz <[email protected]>
This commit was merged in pull request #15.
This commit is contained in:
1 parent
e6a97be894
commit
8f6dacba10
18 files changed
+5222
-26
No files matched your search
@@ -0,0 +1,4 @@
|
||||
ALTER TABLE "import_grant" ADD COLUMN "proof_code" text;--> statement-breakpoint
|
||||
ALTER TABLE "import_grant" ADD COLUMN "proof_checked_at" timestamp with time zone;--> statement-breakpoint
|
||||
ALTER TABLE "user" ADD COLUMN "unclaimed_imvu_id" bigint;--> statement-breakpoint
|
||||
ALTER TABLE "user" ADD CONSTRAINT "user_unclaimed_imvu_id_unique" UNIQUE("unclaimed_imvu_id");
|
||||
File diff suppressed because it is too large.
Load diff
@@ -127,6 +127,13 @@
|
||||
"when": 1794073227716,
|
||||
"tag": "0017_importer_accounts",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 18,
|
||||
"version": "7",
|
||||
"when": 1794078168609,
|
||||
"tag": "0018_recorded_grants",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -47,6 +47,9 @@ export const user = pgTable(
|
||||
approved: boolean("approved").notNull().default(true),
|
||||
// Two-factor sign-in (an authenticator app), required for sensitive permissions (docs/console.md).
|
||||
twoFactorEnabled: boolean("two_factor_enabled").notNull().default(false),
|
||||
// An unclaimed creator (docs/imports.md): a placeholder without credentials for an IMVU creator whose consent an
|
||||
// admin recorded; its IMVU account. Whoever links that account can claim what it has.
|
||||
unclaimedImvuId: bigint("unclaimed_imvu_id", { mode: "number" }).unique(),
|
||||
},
|
||||
(t) => [uniqueIndex("user_username_lower").on(sql`lower(${t.username})`)],
|
||||
);
|
||||
@@ -747,6 +750,9 @@ export const importGrant = pgTable(
|
||||
consentKind: text("consent_kind").notNull().default("verified"), // "verified" (the creator), "recorded" (an admin)
|
||||
evidence: text("evidence").notNull().default(""), // recorded: how they agreed
|
||||
recordedBy: text("recorded_by").references(() => user.id, { onDelete: "set null" }),
|
||||
// Recorded: proof without an account, a code the creator put in their IMVU tagline, and when the hub saw it.
|
||||
proofCode: text("proof_code"),
|
||||
proofCheckedAt: timestamp("proof_checked_at", { withTimezone: true }),
|
||||
// "pending" (the catalog's team hasn't accepted), "active", "declined", "suspended", "withdrawn".
|
||||
status: text("status").notNull().default("pending"),
|
||||
statusReason: text("status_reason").notNull().default(""),
|
||||
|
||||
Reference in new issue
Block a user