fix(agents): enforce board access for instructions path updates

This commit is contained in:
Dotta committed 2026-04-19 21:45:59 -05:00
1 parent 31cbff3d87
commit 06dca71020
1 file changed
+4
+4
View File
@@ -1694,6 +1694,10 @@ export function agentRoutes(db: Db) {
});
router.patch("/agents/:id/instructions-path", validate(updateAgentInstructionsPathSchema), async (req, res) => {
if (req.actor.type !== "board") {
throw forbidden("Only board-authenticated callers can manage instructions path or bundle configuration");
}
const id = req.params.id as string;
const existing = await svc.getById(id);
if (!existing) {