aboutsummaryrefslogtreecommitdiffstats
path: root/postgrest/migrations/003-roles.sql
blob: 86e49f0a9e594b1dc3fee813bb2b0053c59147f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- authenticator role
create role authenticator noinherit login password 'mysecretpassword';

-- web_anon role
create role web_anon nologin;
grant usage on schema api to web_anon;
grant web_anon to authenticator;
-- grant select on api.todos to web_anon;

-- todo_user role
create role todo_user nologin;
grant usage on schema api to todo_user;
grant all on api.todos to todo_user;
grant usage, select on sequence api.todos_id_seq to todo_user;
grant todo_user to authenticator;