Files
thrilltrack-explorer/supabase/migrations/20251102024255_bf859683-9b2a-4761-b4b7-78283b764ea2.sql
gpt-engineer-app[bot] 2e632caea3 Fix audit log RLS policy
2025-11-02 02:43:09 +00:00

15 lines
491 B
SQL

-- Relax admin_audit_log SELECT policy to not require AAL2
-- This allows admins to view audit logs without constant MFA step-up
-- Write operations still require AAL2 for security
-- Drop the existing SELECT policy
DROP POLICY IF EXISTS "Admins can view audit log" ON public.admin_audit_log;
-- Create new SELECT policy without AAL2 requirement for reads
CREATE POLICY "Admins can view audit log"
ON public.admin_audit_log
FOR SELECT
TO authenticated
USING (
is_moderator(auth.uid())
);