Commit b783d316 authored by Rodrigo Tapia-McClung's avatar Rodrigo Tapia-McClung

update README

parent 3f2f1b0f
...@@ -22,15 +22,17 @@ CREATE ROLE readaccess; ...@@ -22,15 +22,17 @@ CREATE ROLE readaccess;
GRANT USAGE ON SCHEMA public TO readaccess; GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
-- Create a final user with password -- Create a final user with password
CREATE USER <user> WITH PASSWORD '<pw>'; CREATE USER <user> WITH PASSWORD '<pw>';
GRANT readaccess TO <user>; GRANT readaccess TO <user>;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO <user>; GRANT SELECT ON ALL TABLES IN SCHEMA public TO <user>;
``` ```
-- Grant access to future tables on role and user
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO <user>;
Make sure to edit /etc/postgresql/10/main/pg_hba.conf line Make sure to edit /etc/postgresql/10/main/pg_hba.conf line
`local all all peer` `local all all peer`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment