From a0484af0ab0ab850580638cb7514858c1bc74390 Mon Sep 17 00:00:00 2001 From: Maria Haider Date: Sun, 11 May 2025 11:01:13 +0200 Subject: [PATCH] granting privilage to public schema --- .../puppet/modules/net/templates/cisoassistant/init-db.sh.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/global/overlay/etc/puppet/modules/net/templates/cisoassistant/init-db.sh.erb b/global/overlay/etc/puppet/modules/net/templates/cisoassistant/init-db.sh.erb index a38acdd..8669c98 100644 --- a/global/overlay/etc/puppet/modules/net/templates/cisoassistant/init-db.sh.erb +++ b/global/overlay/etc/puppet/modules/net/templates/cisoassistant/init-db.sh.erb @@ -6,4 +6,8 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL ALTER USER "ciso-assistantuser" WITH PASSWORD '<%= @postgres_user_password %>'; CREATE DATABASE "ciso-assistant"; GRANT ALL PRIVILEGES ON DATABASE "ciso-assistant" TO "ciso-assistantuser"; +EOSQL + +psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "ciso-assistant" <<-EOSQL + GRANT ALL ON SCHEMA public TO "ciso-assistantuser"; EOSQL \ No newline at end of file