Closed noamross closed 4 years ago
Here are my proposed SQL commands to create a read-only user:
revoke create on schema public from public;
create role repel_reader with login encrypted password 'yellow555zephyr222camera' nosuperuser
inherit nocreatedb nocreaterole noreplication valid until 'infinity';
grant connect on database repel to repel_reader;
grant usage on schema public to repel_reader;
grant select on all tables in schema public to repel_reader;
As I mentioned in our meeting, this turns off crate table authority for everyone but root, so we'll have to run commands to turn it back on per user with:
grant create on schema public to givenuser;
Clean-up tasks: