Mercurial > gemma
diff schema/manage_users_tests.sql @ 4740:2440d2f86f4e
Authorize sections based on country of creator
Disregarding the area of resposibility will allow to create sections
outside of the country of the user in order to allow data analysis
and aggregation based on sections spanning over multiple countries.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 18 Oct 2019 12:04:04 +0200 |
parents | baabc2b2f094 |
children | b33121a54793 |
line wrap: on
line diff
--- a/schema/manage_users_tests.sql Fri Oct 18 12:01:21 2019 +0200 +++ b/schema/manage_users_tests.sql Fri Oct 18 12:04:04 2019 +0200 @@ -28,7 +28,7 @@ SELECT best_utm(ST_Collect(area::geometry)) FROM users.stretches st JOIN users.stretch_countries stc ON stc.stretch_id = st.id - WHERE country = users.current_user_country() + WHERE country = users.user_country() $$, 'Geometry has SRID corresponding to best_utm()'); @@ -169,7 +169,7 @@ UPDATE users.list_users SET (pw, map_extent, email_address) = ('user_at2!', 'BOX(0 0,1 1)', 'user_at_test') - WHERE country = users.current_user_country() + WHERE country = users.user_country() AND username <> current_user RETURNING * $$,