comparison schema/updates/1304/01.add_section_rls.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
children
comparison
equal deleted inserted replaced
4675:a586de1b4466 4676:5b9ba358a4e7
1 CREATE POLICY hide_staging ON waterway.sections
2 FOR SELECT TO waterway_user USING (staging_done);
3
4 CREATE POLICY sys_admin ON waterway.sections
5 FOR ALL TO sys_admin USING (true);
6
7 CREATE POLICY responsibility_area ON waterway.sections
8 FOR ALL TO waterway_admin
9 USING (users.utm_covers(area));
10
11 ALTER TABLE waterway.sections ENABLE ROW LEVEL SECURITY