Skip to content

[2c] Org isolation enforcement #9

@andrmaz

Description

@andrmaz

What to build

All read and write paths in the API and MCP layer are scoped by the authenticated user's Organization at the middleware/query layer. Cross-organization data access is blocked by default. Org-scoping is enforced for every Prisma query and is not an opt-in.

Acceptance criteria

  • A middleware/helper enforces org-scoped filtering on all DB queries.
  • Attempting to read another org's data via API returns 403/404.
  • MCP calls are also org-scoped — no cross-org leakage through the MCP path.
  • Integration tests verify isolation for both API and MCP paths.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmvpCortex MVP scope

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions