@@ -44,6 +44,138 @@ order by
44
44
auth | users | supabase_auth_admin | f |
45
45
(5 rows)
46
46
47
+ -- auth schema objects with roles privileges
48
+ select
49
+ ns.nspname as schema_name,
50
+ c.relname as table_name,
51
+ r.rolname as role_name,
52
+ a.privilege_type,
53
+ a.is_grantable
54
+ from
55
+ pg_class c
56
+ join
57
+ pg_namespace ns on c.relnamespace = ns.oid
58
+ cross join lateral
59
+ aclexplode(c.relacl) as a
60
+ join
61
+ pg_roles r on a.grantee = r.oid
62
+ where
63
+ ns.nspname = 'auth'
64
+ and c.relkind in ('r', 'v', 'm')
65
+ and a.privilege_type <> 'MAINTAIN'
66
+ order by
67
+ c.relname,
68
+ r.rolname,
69
+ a.privilege_type;
70
+ schema_name | table_name | role_name | privilege_type | is_grantable
71
+ -------------+-------------------+---------------------+----------------+--------------
72
+ auth | audit_log_entries | dashboard_user | DELETE | f
73
+ auth | audit_log_entries | dashboard_user | INSERT | f
74
+ auth | audit_log_entries | dashboard_user | REFERENCES | f
75
+ auth | audit_log_entries | dashboard_user | SELECT | f
76
+ auth | audit_log_entries | dashboard_user | TRIGGER | f
77
+ auth | audit_log_entries | dashboard_user | TRUNCATE | f
78
+ auth | audit_log_entries | dashboard_user | UPDATE | f
79
+ auth | audit_log_entries | postgres | DELETE | f
80
+ auth | audit_log_entries | postgres | INSERT | f
81
+ auth | audit_log_entries | postgres | REFERENCES | f
82
+ auth | audit_log_entries | postgres | SELECT | f
83
+ auth | audit_log_entries | postgres | TRIGGER | f
84
+ auth | audit_log_entries | postgres | TRUNCATE | f
85
+ auth | audit_log_entries | postgres | UPDATE | f
86
+ auth | audit_log_entries | supabase_auth_admin | DELETE | f
87
+ auth | audit_log_entries | supabase_auth_admin | INSERT | f
88
+ auth | audit_log_entries | supabase_auth_admin | REFERENCES | f
89
+ auth | audit_log_entries | supabase_auth_admin | SELECT | f
90
+ auth | audit_log_entries | supabase_auth_admin | TRIGGER | f
91
+ auth | audit_log_entries | supabase_auth_admin | TRUNCATE | f
92
+ auth | audit_log_entries | supabase_auth_admin | UPDATE | f
93
+ auth | instances | dashboard_user | DELETE | f
94
+ auth | instances | dashboard_user | INSERT | f
95
+ auth | instances | dashboard_user | REFERENCES | f
96
+ auth | instances | dashboard_user | SELECT | f
97
+ auth | instances | dashboard_user | TRIGGER | f
98
+ auth | instances | dashboard_user | TRUNCATE | f
99
+ auth | instances | dashboard_user | UPDATE | f
100
+ auth | instances | postgres | DELETE | f
101
+ auth | instances | postgres | INSERT | f
102
+ auth | instances | postgres | REFERENCES | f
103
+ auth | instances | postgres | SELECT | f
104
+ auth | instances | postgres | TRIGGER | f
105
+ auth | instances | postgres | TRUNCATE | f
106
+ auth | instances | postgres | UPDATE | f
107
+ auth | instances | supabase_auth_admin | DELETE | f
108
+ auth | instances | supabase_auth_admin | INSERT | f
109
+ auth | instances | supabase_auth_admin | REFERENCES | f
110
+ auth | instances | supabase_auth_admin | SELECT | f
111
+ auth | instances | supabase_auth_admin | TRIGGER | f
112
+ auth | instances | supabase_auth_admin | TRUNCATE | f
113
+ auth | instances | supabase_auth_admin | UPDATE | f
114
+ auth | refresh_tokens | dashboard_user | DELETE | f
115
+ auth | refresh_tokens | dashboard_user | INSERT | f
116
+ auth | refresh_tokens | dashboard_user | REFERENCES | f
117
+ auth | refresh_tokens | dashboard_user | SELECT | f
118
+ auth | refresh_tokens | dashboard_user | TRIGGER | f
119
+ auth | refresh_tokens | dashboard_user | TRUNCATE | f
120
+ auth | refresh_tokens | dashboard_user | UPDATE | f
121
+ auth | refresh_tokens | postgres | DELETE | f
122
+ auth | refresh_tokens | postgres | INSERT | f
123
+ auth | refresh_tokens | postgres | REFERENCES | f
124
+ auth | refresh_tokens | postgres | SELECT | f
125
+ auth | refresh_tokens | postgres | TRIGGER | f
126
+ auth | refresh_tokens | postgres | TRUNCATE | f
127
+ auth | refresh_tokens | postgres | UPDATE | f
128
+ auth | refresh_tokens | supabase_auth_admin | DELETE | f
129
+ auth | refresh_tokens | supabase_auth_admin | INSERT | f
130
+ auth | refresh_tokens | supabase_auth_admin | REFERENCES | f
131
+ auth | refresh_tokens | supabase_auth_admin | SELECT | f
132
+ auth | refresh_tokens | supabase_auth_admin | TRIGGER | f
133
+ auth | refresh_tokens | supabase_auth_admin | TRUNCATE | f
134
+ auth | refresh_tokens | supabase_auth_admin | UPDATE | f
135
+ auth | schema_migrations | dashboard_user | DELETE | f
136
+ auth | schema_migrations | dashboard_user | INSERT | f
137
+ auth | schema_migrations | dashboard_user | REFERENCES | f
138
+ auth | schema_migrations | dashboard_user | SELECT | f
139
+ auth | schema_migrations | dashboard_user | TRIGGER | f
140
+ auth | schema_migrations | dashboard_user | TRUNCATE | f
141
+ auth | schema_migrations | dashboard_user | UPDATE | f
142
+ auth | schema_migrations | postgres | DELETE | f
143
+ auth | schema_migrations | postgres | INSERT | f
144
+ auth | schema_migrations | postgres | REFERENCES | f
145
+ auth | schema_migrations | postgres | SELECT | f
146
+ auth | schema_migrations | postgres | TRIGGER | f
147
+ auth | schema_migrations | postgres | TRUNCATE | f
148
+ auth | schema_migrations | postgres | UPDATE | f
149
+ auth | schema_migrations | supabase_auth_admin | DELETE | f
150
+ auth | schema_migrations | supabase_auth_admin | INSERT | f
151
+ auth | schema_migrations | supabase_auth_admin | REFERENCES | f
152
+ auth | schema_migrations | supabase_auth_admin | SELECT | f
153
+ auth | schema_migrations | supabase_auth_admin | TRIGGER | f
154
+ auth | schema_migrations | supabase_auth_admin | TRUNCATE | f
155
+ auth | schema_migrations | supabase_auth_admin | UPDATE | f
156
+ auth | users | dashboard_user | DELETE | f
157
+ auth | users | dashboard_user | INSERT | f
158
+ auth | users | dashboard_user | REFERENCES | f
159
+ auth | users | dashboard_user | SELECT | f
160
+ auth | users | dashboard_user | TRIGGER | f
161
+ auth | users | dashboard_user | TRUNCATE | f
162
+ auth | users | dashboard_user | UPDATE | f
163
+ auth | users | postgres | DELETE | f
164
+ auth | users | postgres | INSERT | f
165
+ auth | users | postgres | REFERENCES | f
166
+ auth | users | postgres | SELECT | f
167
+ auth | users | postgres | TRIGGER | f
168
+ auth | users | postgres | TRUNCATE | f
169
+ auth | users | postgres | UPDATE | f
170
+ auth | users | supabase_auth_admin | DELETE | f
171
+ auth | users | supabase_auth_admin | INSERT | f
172
+ auth | users | supabase_auth_admin | REFERENCES | f
173
+ auth | users | supabase_auth_admin | SELECT | f
174
+ auth | users | supabase_auth_admin | TRIGGER | f
175
+ auth | users | supabase_auth_admin | TRUNCATE | f
176
+ auth | users | supabase_auth_admin | UPDATE | f
177
+ (105 rows)
178
+
47
179
-- auth indexes with owners
48
180
select
49
181
ns.nspname as table_schema,
0 commit comments