mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 16:11:12 -05:00
Fix SECURITY DEFINER on views
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
-- Set filtered_profiles view to use security_invoker
|
||||||
|
-- This makes the view execute with the permissions of the invoking user, not the creator
|
||||||
|
ALTER VIEW public.filtered_profiles SET (security_invoker = true);
|
||||||
|
|
||||||
|
COMMENT ON VIEW public.filtered_profiles IS 'Profile view with field-level privacy controls using security_invoker. Uses security definer functions for granular permission checks but view respects querying user context.';
|
||||||
Reference in New Issue
Block a user