diff schema/auth.sql @ 4676:5b9ba358a4e7

Add missing RLS policies for sections
author Tom Gottfried <tom@intevation.de>
date Tue, 15 Oct 2019 16:28:46 +0200
parents 5e38667f740c
children 2440d2f86f4e
line wrap: on
line diff
--- a/schema/auth.sql	Tue Oct 15 16:13:10 2019 +0200
+++ b/schema/auth.sql	Tue Oct 15 16:28:46 2019 +0200
@@ -92,6 +92,7 @@
         'gauge_measurements',
         'waterway_profiles',
         'fairway_dimensions',
+        'sections',
         'bottlenecks',
         'sounding_results']
     LOOP
@@ -148,6 +149,10 @@
     FOR ALL TO waterway_admin
     USING (users.utm_covers(area));
 
+CREATE POLICY responsibility_area ON waterway.sections
+    FOR ALL TO waterway_admin
+    USING (users.utm_covers(area));
+
 CREATE POLICY sys_admin ON users.stretches
     FOR ALL TO sys_admin
     USING (true);