godcrm/backend/database/migrations/004-space-access-control.sql
GOD CRM Release f89e074dd1
Some checks failed
CI / Lint / Typecheck / Test / Build (push) Has been cancelled
CI / PostgreSQL Integration Tests (push) Has been cancelled
GOD CRM — public scrubbed snapshot
Governed substrate for autonomous agents: scoped identity (passports),
audited actions, MCP workspace. Infra IPs and secrets redacted for public release.
2026-08-10 04:01:45 +03:00

23 lines
686 B
SQL

-- Migration: Add access_control to spaces
-- Date: 2024-12-07
-- Description: Add access_control column for role-based permissions at space level
-- Add access_control column to spaces table
ALTER TABLE spaces ADD COLUMN access_control TEXT DEFAULT NULL;
-- access_control structure (JSON):
-- {
-- "enabled": true,
-- "mode": "roles",
-- "usersTableId": 123,
-- "userIdColumn": "id",
-- "userNameColumn": "name",
-- "roleColumn": "role",
-- "roleMapping": {
-- "owner": ["owner", "creator"],
-- "admin": ["admin", "administrator"],
-- "editor": ["editor", "manager"],
-- "viewer": ["viewer", "user"],
-- "denied": ["blocked", "banned"]
-- }
-- }