You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Add document_share table (CREATE TABLE IF NOT EXISTS; opaque token, optional expiry, revoke flag) and repos-shares.ts: - mintShare: 256-bit randomBytes hex token (64 hex, unique), default +30d expiry, audited — the token itself is never written to the audit trail or any log. - validateShare: resolves a live token to its one document; null on unknown / revoked / expired (ISO-8601 UTC lexical compare). - revokeShare: flips revoked=1, audited. - listShares: a document's shares, scoped and newest-first. Wire POST /api/documents/:id/share and POST /api/documents/:id/share/:shareId/revoke (requireAuth, document-scoped share guard) and surface shares on GET /api/documents/:id. TDD: 14 tests cover token shape/uniqueness, validate rejections, revoke, and audit-without-token. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
1 week ago | |
|---|---|---|
| .. | ||
| scripts | 2 weeks ago | |
| src | 1 week ago | |
| test | 1 week ago | |
| build-server.mjs | 2 weeks ago | |
| package.json | 2 weeks ago | |
| schema.sql | 2 weeks ago | |
| tsconfig.json | 2 weeks ago | |