Skip to content

Commit

Permalink
correct read function perms
Browse files Browse the repository at this point in the history
  • Loading branch information
olirice committed Nov 25, 2024
1 parent e9e13d5 commit 1ddd53e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions nix/tests/expected/pgmq_data_api_wrapper.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This test is to validate the SQL for the Supabase Queues integration that
/*
This test is to validate the SQL for the Supabase Queues integration that
will be triggered in the FE and documented for how to manually expose
queues over supabase client libs by wrapping `pgmq`'s functions into a
separate schema that we can add to PostgREST's 'exposed_schemas' setting
Expand Down Expand Up @@ -194,8 +194,7 @@ grant execute on function pgmq.archive(text, bigint) to postgres, service_role,
grant execute on function queues_public.queue_delete(text, bigint) to postgres, service_role, anon, authenticated;
grant execute on function pgmq.delete(text, bigint) to postgres, service_role, anon, authenticated;
grant execute on function queues_public.queue_read(text, integer, integer) to postgres, service_role, anon, authenticated;
grant execute on function pgmq.read(text, integer, integer, jsonb) to postgres, service_role, anon, authenticated;
ERROR: function pgmq.read(text, integer, integer, jsonb) does not exist
grant execute on function pgmq.read(text, integer, integer) to postgres, service_role, anon, authenticated;
-- For the service role, we want full access
-- Grant permissions on existing tables
grant all privileges on all tables in schema pgmq to postgres, service_role;
Expand Down
6 changes: 3 additions & 3 deletions nix/tests/sql/pgmq_data_api_wrapper.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This test is to validate the SQL for the Supabase Queues integration that
/*
This test is to validate the SQL for the Supabase Queues integration that
will be triggered in the FE and documented for how to manually expose
queues over supabase client libs by wrapping `pgmq`'s functions into a
separate schema that we can add to PostgREST's 'exposed_schemas' setting
Expand Down Expand Up @@ -231,7 +231,7 @@ grant execute on function queues_public.queue_delete(text, bigint) to postgres,
grant execute on function pgmq.delete(text, bigint) to postgres, service_role, anon, authenticated;

grant execute on function queues_public.queue_read(text, integer, integer) to postgres, service_role, anon, authenticated;
grant execute on function pgmq.read(text, integer, integer, jsonb) to postgres, service_role, anon, authenticated;
grant execute on function pgmq.read(text, integer, integer) to postgres, service_role, anon, authenticated;

-- For the service role, we want full access
-- Grant permissions on existing tables
Expand Down

0 comments on commit 1ddd53e

Please sign in to comment.