Skip to content

Commit 576994c

Browse files
committed
Grant Hasura user additional privileges.
1 parent 78079e5 commit 576994c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

azuredbmock/00-initialize.sql

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,16 @@ CREATE EXTENSION IF NOT EXISTS btree_gist;
2424
-- allow hasura to create new schemas
2525
GRANT CREATE ON DATABASE xxx_db_hasura_name_xxx TO xxx_db_hasura_username_xxx;
2626

27-
-- grant usage access to the public schema to the hasura user
27+
-- grant select permissions on information_schema and pg_catalog to the hasura
28+
-- user.
29+
GRANT SELECT ON ALL TABLES IN SCHEMA information_schema TO xxx_db_hasura_username_xxx;
30+
GRANT SELECT ON ALL TABLES IN SCHEMA pg_catalog TO xxx_db_hasura_username_xxx;
31+
32+
-- grant all privileges on all tables in the public schema to the hasura user
2833
GRANT USAGE ON SCHEMA public TO xxx_db_hasura_username_xxx;
34+
GRANT ALL ON ALL TABLES IN SCHEMA public TO xxx_db_hasura_username_xxx;
35+
GRANT ALL ON ALL SEQUENCES IN SCHEMA public TO xxx_db_hasura_username_xxx;
36+
GRANT ALL ON ALL FUNCTIONS IN SCHEMA public TO xxx_db_hasura_username_xxx;
2937

3038
-- create database for auth and give ALL privileges to auth db user
3139
CREATE DATABASE xxx_db_auth_name_xxx;

0 commit comments

Comments
 (0)