8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd2c7f2 commit 9416c3dCopy full SHA for 9416c3d
docker/mnt/00-schema.sql
@@ -0,0 +1,14 @@
1
+-- Strip everyone on rights to the public schema except for the user postgres
2
+REVOKE ALL ON schema public FROM public;
3
+GRANT ALL ON schema public TO postgres;
4
+
5
6
+-- Provide read only access to the schema and its current content
7
+CREATE ROLE public_readonly;
8
+GRANT CONNECT ON DATABASE postgres TO public_readonly;
9
+GRANT USAGE ON SCHEMA public TO public_readonly;
10
+GRANT SELECT ON ALL TABLES IN SCHEMA public TO public_readonly;
11
12
+-- Provide read only access to future tables in the schema
13
+ALTER DEFAULT PRIVILEGES IN SCHEMA public
14
+GRANT SELECT ON TABLES TO public_readonly;
0 commit comments