Skip to content

Commit

Permalink
Merge pull request #10 from SPHTech-Platform/priv
Browse files Browse the repository at this point in the history
Adding Privilege to create table in public schema
  • Loading branch information
thepoppingone authored Aug 7, 2023
2 parents 3257759 + 0ecbcd6 commit 5227d0a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lambda/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def provision_db_and_user(master_secrets_json, secret_json):
# Grant privileges
grant_sql = "GRANT CONNECT ON DATABASE {} TO {};".format(database_name, username)
grant_sql += "GRANT ALL PRIVILEGES ON DATABASE {} TO {};".format(database_name, username)
grant_sql += "GRANT USAGE, CREATE ON SCHEMA public TO {};".format(username)
grant_sql += "GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO {};".format(username)
grant_sql += "GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO {};".format(username)
grant_sql += "GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO {};".format(username)
Expand Down

0 comments on commit 5227d0a

Please sign in to comment.