annotate schema/demo-data/users.sql @ 268:72062ca52746

Make user_profiles table invisible for users users.list_users should be the single point to access user profile data. Keeping user_profiles visible would imply having to maintain RLS policies that are otherwise obsolete. Tests run as superuser still use user_profiles, because list_users does not show any data to a superuser.
author Tom Gottfried <tom@intevation.de>
date Mon, 30 Jul 2018 11:38:09 +0200
parents 531d1f8a2b4b
children 46a80016293c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
138
c79709af2c76 Demo Data: make user.sql atomic and use copy everywhere.
Sascha Wilde <wilde@intevation.de>
parents: 137
diff changeset
1 BEGIN;
c79709af2c76 Demo Data: make user.sql atomic and use copy everywhere.
Sascha Wilde <wilde@intevation.de>
parents: 137
diff changeset
2
176
0c0826063561 Separate cluster and database specific commands
Tom Gottfried <tom@intevation.de>
parents: 138
diff changeset
3 -- PREREQUISITES:
211
e7826710d9c4 Make responsibility area mandatory
Tom Gottfried <tom@intevation.de>
parents: 208
diff changeset
4 -- Cluster has roles as created by roles.sql,
e7826710d9c4 Make responsibility area mandatory
Tom Gottfried <tom@intevation.de>
parents: 208
diff changeset
5 -- responsibility areas from responsibility_areas.sql are imported
137
433a992befdb Added basic demo data.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
6
433a992befdb Added basic demo data.
Sascha Wilde <wilde@intevation.de>
parents:
diff changeset
7 -- Fill in Profiles
268
72062ca52746 Make user_profiles table invisible for users
Tom Gottfried <tom@intevation.de>
parents: 233
diff changeset
8 COPY internal.user_profiles (username, country, email_address, map_extent) FROM stdin;
212
229f385448fa Make map extent mandatory
Tom Gottfried <tom@intevation.de>
parents: 211
diff changeset
9 sophie AT sophie@example.com BOX(9.52115482500011 46.3786430870001,17.1483378500001 49.0097744750001)
229f385448fa Make map extent mandatory
Tom Gottfried <tom@intevation.de>
parents: 211
diff changeset
10 lucian RO lucian@example.com BOX(20.2428259690001 43.6500499480001,29.6995548840001 48.2748322560001)
229f385448fa Make map extent mandatory
Tom Gottfried <tom@intevation.de>
parents: 211
diff changeset
11 oana RO oana@example.com BOX(20.2428259690001 43.6500499480001,29.6995548840001 48.2748322560001)
229f385448fa Make map extent mandatory
Tom Gottfried <tom@intevation.de>
parents: 211
diff changeset
12 penka BG penka@example.com BOX(22.3450232340001 41.238104147,28.6035262380001 44.228434539)
229f385448fa Make map extent mandatory
Tom Gottfried <tom@intevation.de>
parents: 211
diff changeset
13 vanja BG vanja@example.com BOX(22.3450232340001 41.238104147,28.6035262380001 44.228434539)
138
c79709af2c76 Demo Data: make user.sql atomic and use copy everywhere.
Sascha Wilde <wilde@intevation.de>
parents: 137
diff changeset
14 \.
c79709af2c76 Demo Data: make user.sql atomic and use copy everywhere.
Sascha Wilde <wilde@intevation.de>
parents: 137
diff changeset
15
c79709af2c76 Demo Data: make user.sql atomic and use copy everywhere.
Sascha Wilde <wilde@intevation.de>
parents: 137
diff changeset
16 COMMIT;