Implement email support with per-user permission model (closes #2)
New modules: - server/mailer.mjs: nodemailer transport wrapper - server/mail_perms.mjs: runtime permission store, persisted to disk New actions: - send-email: checks (caller, to, topic) permission before sending - set-mail-permission: grant/revoke permissions, gated by canApprove - get-mail-permissions: list current permissions Handler signature extended to handler(params, ctx) where ctx carries caller, users, mail_perm_store and mailer_send. Existing handlers ignore ctx so the change is backwards-compatible. SMTP config lives in secrets.json under optional 'smtp' key. Mail permissions path via --mail-perms or CONDUIT_MAIL_PERMS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,11 +10,12 @@
|
||||
"bin": {
|
||||
"ccc-server": "bin/ccc-server.mjs",
|
||||
"ccc-client": "bin/ccc-client.mjs",
|
||||
"ccc-queue": "bin/ccc-queue.mjs",
|
||||
"ccc-queue": "bin/ccc-queue.mjs",
|
||||
"ccc-keygen": "bin/ccc-keygen.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"blessed": "^0.1.81",
|
||||
"express": "^5.2.1"
|
||||
"express": "^5.2.1",
|
||||
"nodemailer": "^8.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user