fix: enable rls on remaining public tables
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
DROP POLICY IF EXISTS profiles_self_update ON public.profiles;
|
||||
DROP POLICY IF EXISTS profiles_self_select ON public.profiles;
|
||||
|
||||
ALTER TABLE public.vmid_reservations DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.cluster_vmid_allocators DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.clusters DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.profiles DISABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.schema_migrations DISABLE ROW LEVEL SECURITY;
|
||||
@@ -0,0 +1,16 @@
|
||||
ALTER TABLE public.schema_migrations ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.profiles ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.clusters ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.cluster_vmid_allocators ENABLE ROW LEVEL SECURITY;
|
||||
ALTER TABLE public.vmid_reservations ENABLE ROW LEVEL SECURITY;
|
||||
|
||||
CREATE POLICY profiles_self_select
|
||||
ON public.profiles
|
||||
FOR SELECT
|
||||
USING (id = public.current_profile_id());
|
||||
|
||||
CREATE POLICY profiles_self_update
|
||||
ON public.profiles
|
||||
FOR UPDATE
|
||||
USING (id = public.current_profile_id())
|
||||
WITH CHECK (id = public.current_profile_id());
|
||||
Reference in New Issue
Block a user