Skip to content

Commit 15c97cb

Browse files
iniansoedirgo
andauthored
chore: grant auth roles to supabase_storage_admin user (#590)
* chore: grant auth roles to supabase_storage_admin user supabase_storage_admin needs to be able to switch to these roles without relying postgrest * add tests for supabase_storage_admin membership --------- Co-authored-by: Bobbie Soedirgo <[email protected]>
1 parent 549fd4e commit 15c97cb

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
-- migrate:up
2+
grant anon, authenticated, service_role to supabase_storage_admin;
3+
4+
-- migrate:down

migrations/tests/storage/privs.sql

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
select is_member_of('anon', 'supabase_storage_admin');
2+
select is_member_of('authenticated', 'supabase_storage_admin');
3+
select is_member_of('service_role', 'supabase_storage_admin');

migrations/tests/storage/test.sql

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

22
\ir exists.sql
3+
\ir privs.sql

migrations/tests/test.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BEGIN;
55

66
CREATE EXTENSION IF NOT EXISTS pgtap;
77

8-
SELECT plan(33);
8+
SELECT plan(36);
99

1010
\ir fixtures.sql
1111
\ir database/test.sql

0 commit comments

Comments
 (0)