Skip to content

Commit

Permalink
add sql api user permissions workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharlie committed Mar 16, 2022
1 parent 2bdc040 commit 3cde0c7
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions config/sql/general.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
-- grant all explicit to api_user (workaround)
GRANT CONNECT ON DATABASE analysis TO api_user;

GRANT USAGE ON SCHEMA publish TO api_user;

GRANT
SELECT
ON ALL TABLES IN SCHEMA publish TO api_user;

ALTER DEFAULT PRIVILEGES IN SCHEMA publish GRANT
SELECT
ON TABLES TO api_user;

GRANT USAGE ON ALL SEQUENCES IN SCHEMA publish TO api_user;

ALTER DEFAULT PRIVILEGES IN SCHEMA publish GRANT USAGE ON SEQUENCES TO api_user;

CREATE
OR REPLACE FUNCTION RefreshAllMaterializedViews(schema_arg TEXT DEFAULT 'public') RETURNS INT AS $ $ DECLARE r RECORD;

Expand Down

0 comments on commit 3cde0c7

Please sign in to comment.