mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-10 20:46:28 +01:00
fix(agents): enforce board access for instructions path updates
This commit is contained in:
1 parent
31cbff3d87
commit
06dca71020
1 file changed
+4
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user