# HG changeset patch # User Tom Gottfried # Date 1554302523 -7200 # Node ID 96ac7a980ec2bb465149e1ba6ed82e17b9b2d428 # Parent c1f2b9148cc8e7144265a69bb0b6d9bab5df9799 Allow sys_admin to access tables in staging area without restrictions diff -r c1f2b9148cc8 -r 96ac7a980ec2 schema/auth.sql --- a/schema/auth.sql Wed Apr 03 16:23:25 2019 +0200 +++ b/schema/auth.sql Wed Apr 03 16:42:03 2019 +0200 @@ -102,6 +102,8 @@ LOOP EXECUTE format('CREATE POLICY hide_staging ON waterway.%I ' 'FOR SELECT TO waterway_user USING (staging_done)', the_table); + EXECUTE format('CREATE POLICY sys_admin ON waterway.%I ' + 'FOR ALL TO sys_admin USING (true)', the_table); EXECUTE format('ALTER TABLE waterway.%I ENABLE ROW LEVEL SECURITY', the_table); END LOOP; @@ -149,10 +151,6 @@ FOR ALL TO waterway_admin USING (users.utm_covers(area)); -CREATE POLICY sys_admin ON waterway.stretches - FOR ALL TO sys_admin - USING (true); - -- -- RLS policies for imports and import config --