Spaces:
Running
Running
Commit History
-
fix: use DO block to add team_id column if teams table has wrong schema
1361870 -
fix: rbac_migration — create teams table if schema.sql was skipped
6bc4034
-
Fix rbac_migration: upsert default team before channel FK insert
e32f628 -
feat: RBAC foundation — workspaces, channels, role-based access
- supabase/rbac_migration.sql: workspaces, users, channels, channel_role_grants, user_channel_permissions, rbac_audit_log tables; backfills existing data into default workspace + General channel; RLS policies - src/auth/db.py: DB-backed user lookup + channel resolution (role grants + per-user overrides merged, explicit revokes subtracted) - src/auth/deps.py: get_current_user FastAPI dependency + require_role() factory - src/auth/router.py: login tries Supabase DB first, falls back to hardcoded dev creds; always includes allowed_channel_ids in the session payload - src/config.py: add supabase_url/supabase_key to main Settings - agent/models.py: QueryInput gains allowed_channel_ids (server-side only) - agent/api.py: query endpoint validates session via get_current_user; overwrites team_id and allowed_channel_ids from auth — client body values are ignored - agent/tools/doc_search.py: Qdrant filter uses channel_ids when set; falls back to team_id for legacy points without chann…a8e67fc