Mercurial > gemma
annotate schema/updates/1424/01.add_axis_rls.sql @ 5560:f2204f91d286
Join the log lines of imports to the log exports to recover data from them.
Used in SR export to extract information that where in the meta json
but now are only found in the log.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 09 Feb 2022 18:34:40 +0100 |
parents | 7dff1015283d |
children |
rev | line source |
---|---|
5013
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
1 CREATE POLICY hide_nothing ON waterway.waterway_axis |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
2 FOR SELECT TO waterway_user USING (true); |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
3 CREATE POLICY sys_admin ON waterway.waterway_axis |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
4 FOR ALL TO sys_admin USING (true); |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
5 |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
6 CREATE POLICY responsibility_area_insert ON waterway.waterway_axis |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
7 FOR INSERT TO waterway_admin |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
8 WITH CHECK (users.utm_covers(wtwaxs)); |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
9 CREATE POLICY responsibility_area_update ON waterway.waterway_axis |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
10 FOR UPDATE TO waterway_admin |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
11 USING (users.utm_covers(wtwaxs)); |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
12 CREATE POLICY responsibility_area_delete ON waterway.waterway_axis |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
13 FOR DELETE TO waterway_admin |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
14 USING (users.utm_covers(wtwaxs)); |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
15 |
7dff1015283d
Add row level security policies for waterway axis
Tom Gottfried <tom@intevation.de>
parents:
diff
changeset
|
16 ALTER TABLE waterway.waterway_axis ENABLE ROW LEVEL SECURITY; |