소스 검색

Lovable update

Lovable tool use: Approved.

context: 6951EAA2-1264-4A1A-A86D-817E462202C7

tool_name:Modify database

X-Lovable-Edit-ID: edt-66d9b8eb-3aed-49cb-9f71-bbf2e9cc4f92
gpt-engineer-app[bot] 2 일 전
부모
커밋
36c747be94
1개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 13 0
      supabase/migrations/20260113131534_155b10db-193a-4a94-a12c-333870d2266a.sql

+ 13 - 0
supabase/migrations/20260113131534_155b10db-193a-4a94-a12c-333870d2266a.sql

@@ -0,0 +1,13 @@
+-- Fix 1: super_users email exposure
+-- Remove direct SELECT access to super_users table
+-- The is_super_user() function (security definer) will still work for checking status
+DROP POLICY IF EXISTS "Users can only view their own super_user entry" ON public.super_users;
+
+CREATE POLICY "No direct access to super_users"
+ON public.super_users
+FOR SELECT
+USING (false);
+
+-- Fix 2: articles public content exposure  
+-- Remove public access policy, keep only authenticated users policy
+DROP POLICY IF EXISTS "Public users can read articles" ON public.articles;