From 8d5f272ba5918db572f65d203ec10e64d120320e Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Thu, 30 Jul 2026 01:00:59 +0200 Subject: [PATCH] fix: deploy.py RLS exclude list reduced to 35 system tables only --- scripts/deploy.py | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/scripts/deploy.py b/scripts/deploy.py index d9f7517..87adf65 100644 --- a/scripts/deploy.py +++ b/scripts/deploy.py @@ -323,26 +323,17 @@ DECLARE t TEXT; BEGIN FOR t IN SELECT table_name FROM information_schema.columns WHERE column_name = 'tenant_id' AND table_schema = 'public' LOOP -- Skip system/auth/config tables that need access without tenant context - IF t IN ('users', 'tenants', 'user_tenants', 'sessions', 'audit_log', - 'user_groups', 'permissions', 'password_reset_tokens', 'api_tokens', - 'groups', 'roles', 'system_settings', 'currencies', 'tax_rates', - 'sequences', 'saved_filters', 'saved_views', 'webhooks', - 'notification_preferences', 'tenant_plugin_activation', + IF t IN ('users', 'tenants', 'user_tenants', 'sessions', + 'audit_log', 'password_reset_tokens', 'api_tokens', + 'groups', 'roles', 'permissions', 'user_groups', + 'system_settings', 'currencies', 'tax_rates', 'sequences', + 'plugins', 'tenant_plugin_activation', 'workspaces', 'workspace_modules', 'workspace_users', 'workspace_widgets', 'automation_cron_jobs', 'automation_definitions', 'automation_runs', 'automation_versions', 'automation_agent_definitions', - 'automation_agent_runs', 'automation_agent_versions', 'plugins', - 'user_preferences', 'custom_field_definitions', 'deletion_log', - 'backups', 'share_links', 'unified_search_index_log', - 'unified_search_providers', 'mcp_server_configs', 'plugin_test_data', - 'report_templates', 'report_instances', 'resource_bookings', - 'resources', 'vacation_sent_log', 'pgp_keys', 'contact_pgp_keys', - 'contact_merge_history', 'entity_links', 'entity_history', - 'contact_folder_permissions', 'contact_folders', 'guest_users', - 'guest_invitations', 'permission_delegations', 'permission_templates', - 'consumer_inbox', 'outbox_deliveries', 'event_outbox', - 'entity_permissions', 'entity_policies', 'entity_attachments', - 'files', 'folders', 'tags', 'tag_assignments', 'tasks', 'subtasks') THEN + 'automation_agent_runs', 'automation_agent_versions', + 'user_preferences', 'saved_filters', 'saved_views', 'webhooks', + 'notification_preferences', 'notification_types') THEN CONTINUE; END IF; EXECUTE 'ALTER TABLE ' || t || ' ENABLE ROW LEVEL SECURITY';