Mercurial > gemma
annotate schema/updates/1304/01.add_section_rls.sql @ 5195:d6710d29516b new-fwa
Started to move code around.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 07 May 2020 15:46:51 +0200 |
parents | 5b9ba358a4e7 |
children |
rev | line source |
---|---|
4676
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 CREATE POLICY hide_staging ON waterway.sections |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 FOR SELECT TO waterway_user USING (staging_done); |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 CREATE POLICY sys_admin ON waterway.sections |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 FOR ALL TO sys_admin USING (true); |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 CREATE POLICY responsibility_area ON waterway.sections |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 FOR ALL TO waterway_admin |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 USING (users.utm_covers(area)); |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 |
5b9ba358a4e7
Add missing RLS policies for sections
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 ALTER TABLE waterway.sections ENABLE ROW LEVEL SECURITY |