server: fix project_shares audit logging and add share transfer
- Fix PATCH /api/projects/:id/shares/:userId: query SELECT 1 instead of SELECT id (project_shares has a composite PK, no id column) - Add audit logging to existing share grant/revoke routes - Add POST /api/projects/:id/transfer for ownership handoff - Remove inline admin user/audit routes from routes.ts (now in admin.ts) - Remove unused requireAdmin import and userPatch schema from routes.ts
This commit is contained in:
@@ -24,6 +24,19 @@ export interface User {
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
/** A single row in the instance audit log (CHUNK #10). */
|
||||
export interface AuditLogEntry {
|
||||
id: string;
|
||||
/** ISO-8601 UTC timestamp of when the action occurred. */
|
||||
at: string;
|
||||
/** Id of the acting user, or `null` for system actions. */
|
||||
userId: string | null;
|
||||
/** Machine-readable action name, e.g. `user_create`, `share_grant`. */
|
||||
action: string;
|
||||
/** Free-form context for the action (email, targetId, perm, …). */
|
||||
detail: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface Project {
|
||||
id: string;
|
||||
projectId: string;
|
||||
|
||||
Reference in New Issue
Block a user