init: grant permissions on public schema
Otherwise table creation fails with: ``` ERROR: permission denied for schema public ``` Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
aa752f4062
commit
f7720f0d5a
|
@ -23,5 +23,7 @@ TEMPLATE "{{ db.template }}"
|
|||
|
||||
-- Permissions
|
||||
{% for user in postgres_ha_users %}
|
||||
GRANT {{ user.priv | default("pg_read_all_data") }} ON DATABASE {{ user.db | mandatory }} TO {{ user.name | mandatory }};
|
||||
\connect "{{ user.db | mandatory }}";
|
||||
GRANT {{ user.priv | default("pg_read_all_data") }} ON DATABASE "{{ user.db | mandatory }}" TO "{{ user.name | mandatory }}";
|
||||
GRANT {{ user.priv | default("pg_read_all_data") }} ON SCHEMA public TO "{{ user.name | mandatory }}";
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue