Close remaining IAM JSON doors and re-walk the lab.
Some checks are pending
offline / test (push) Waiting to run

CS/sales/accounting/staff list endpoints and sales pricing writes
require IAM; fleet service env sets STAFF_AUTH=1. Department tests
use a private books file so lab NATS does not leak into them.
This commit is contained in:
George Lambert 2026-09-11 19:08:20 -04:00
parent c32b65038a
commit 2bb3884a1b
14 changed files with 37 additions and 8 deletions

View file

@ -47,6 +47,7 @@ const server = http.createServer(async (req, res) => {
return json(200, { ok: true, role: 'zappier-sales-pricing' });
}
if (req.method === 'GET' && url.pathname === '/customers') {
if (!(await denyOrRedirect(req, res, json, { permission: 'sales.review' }))) return;
return json(200, { customers: await listCustomers(EDGE, KEY) });
}
const review = url.pathname.match(/^\/review\/([^/]+)$/);
@ -68,6 +69,7 @@ const server = http.createServer(async (req, res) => {
}
const price = url.pathname.match(/^\/customers\/([^/]+)\/pricing$/);
if (req.method === 'PUT' && price) {
if (!(await denyOrRedirect(req, res, json, { permission: 'sales.quote' }))) return;
const chunks = [];
for await (const c of req) chunks.push(c);
const payload = JSON.parse(Buffer.concat(chunks).toString('utf8') || '{}');