Mercurial > gemma
diff schema/auth.sql @ 312:0745b4d336c4
Place functions in more matching schemas
check_password is not meant to be user-visible API.
current_user_country smells like user management related.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 01 Aug 2018 17:35:12 +0200 |
parents | 750a9c9cd965 |
children | 10b93a8ee057 |
line wrap: on
line diff
--- a/schema/auth.sql Wed Aug 01 17:29:52 2018 +0200 +++ b/schema/auth.sql Wed Aug 01 17:35:12 2018 +0200 @@ -80,10 +80,10 @@ CREATE POLICY responsibility_area ON waterway.bottlenecks FOR ALL TO waterway_admin USING (ST_Within(area, (SELECT area FROM users.responsibility_areas - WHERE country = current_user_country()))); + WHERE country = users.current_user_country()))); CREATE POLICY responsibility_area ON waterway.sounding_results FOR ALL TO waterway_admin USING (ST_Within(area, (SELECT area FROM users.responsibility_areas - WHERE country = current_user_country()))); + WHERE country = users.current_user_country()))); COMMIT;