Skip to content

Commit ad1249f

Browse files
committed
test: postgres storage privs
1 parent 41b262e commit ad1249f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

nix/tests/sql/storage.sql

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,21 @@ order by
9595

9696
-- storage service migrations
9797
select * from storage.migrations ;
98+
99+
-- postgres can grant storage privileges to custom roles
100+
create role r;
101+
grant r to postgres;
102+
103+
set role r;
104+
select * from storage.buckets;
105+
106+
set role postgres;
107+
grant usage on schema storage to r;
108+
grant select on storage.buckets to r;
109+
110+
set role r;
111+
select * from storage.buckets;
112+
113+
reset role;
114+
drop owned by r;
115+
drop role r;

0 commit comments

Comments
 (0)