063049b724
Task T3.1: ActorResolver gains findScope (no-create) + assertOwns(principal, resourceScopeId) → ForbiddenException on mismatch (KG-02). RouteService.approve/ deny now assertOwns on the decision's binding scope before mutating; listDecisions is scoped to the caller. Fixes the critical cross-tenant mutation (tenant A could approve tenant B's route). Also adds IiosScope.cellId + IiosOutboundCommand.scopeId columns (migration tenant-isolation) + cell assignment on scope create. Test: another tenant approving → Forbidden, decision unchanged, no scope created, empty list. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
6 lines
180 B
SQL
6 lines
180 B
SQL
-- AlterTable
|
|
ALTER TABLE "IiosOutboundCommand" ADD COLUMN "scopeId" TEXT;
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "IiosScope" ADD COLUMN "cellId" TEXT NOT NULL DEFAULT 'cell-default';
|