Mercurial > gemma
changeset 107:dd3dd2d94703
waterway_admin sees only his own profile anyhow.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 15 Jun 2018 19:46:02 +0200 |
parents | ae5bb7a979ff |
children | f6aba3ee3a75 |
files | auth.sql |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/auth.sql Fri Jun 15 19:38:18 2018 +0200 +++ b/auth.sql Fri Jun 15 19:46:02 2018 +0200 @@ -76,12 +76,10 @@ -- TODO: add all relevant tables here CREATE POLICY responsibility_area ON bottlenecks FOR ALL TO waterway_admin USING (ST_Within(area, (SELECT area FROM responsibility_areas - WHERE country = (SELECT country FROM user_profiles - WHERE username = current_user)))); + WHERE country = (SELECT country FROM user_profiles)))); CREATE POLICY responsibility_area ON sounding_results FOR ALL TO waterway_admin USING (ST_Within(area, (SELECT area FROM responsibility_areas - WHERE country = (SELECT country FROM user_profiles - WHERE username = current_user)))); + WHERE country = (SELECT country FROM user_profiles)))); CREATE POLICY manage_templates ON templates FOR ALL TO waterway_admin USING (id IN(SELECT t.id FROM templates t