Skip to content

Conversation

steve-chavez
Copy link
Member

Problem

We're currently lacking these tests so we don't know the effects of other PRs that modify them. See #994.

@steve-chavez steve-chavez requested review from a team as code owners April 30, 2025 19:11
Comment on lines +70 to +78
schema_name | table_name | role_name | privilege_type | is_grantable
-------------+-------------------+---------------------+----------------+--------------
auth | audit_log_entries | dashboard_user | DELETE | f
auth | audit_log_entries | dashboard_user | INSERT | f
auth | audit_log_entries | dashboard_user | REFERENCES | f
auth | audit_log_entries | dashboard_user | SELECT | f
auth | audit_log_entries | dashboard_user | TRIGGER | f
auth | audit_log_entries | dashboard_user | TRUNCATE | f
auth | audit_log_entries | dashboard_user | UPDATE | f
Copy link
Member Author

@steve-chavez steve-chavez Apr 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: these privileges could be compressed to a single line with array_agg, like:

 schema_name |    table_name     |      role_name      |                      privilege_types                      |  is_grantable   
-------------+-------------------+---------------------+-----------------------------------------------------------+-----------------
 auth        | audit_log_entries | dashboard_user      | {DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE} | {f,f,f,f,f,f,f}
 auth        | audit_log_entries | postgres            | {DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE} | {f,f,f,f,f,f,f}
 auth        | audit_log_entries | supabase_auth_admin | {DELETE,INSERT,REFERENCES,SELECT,TRIGGER,TRUNCATE,UPDATE} | {f,f,f,f,f,f,f}

But then once a test fails is hard to visualize the privileges diff. (case in point: just happened to me with the new MAINTAIN privilege on pg 17, had a previous version with compressed privs and that was hard to visualize, wasted some time there).

@steve-chavez steve-chavez merged commit 4a08f05 into develop Apr 30, 2025
13 of 14 checks passed
@steve-chavez steve-chavez deleted the services-privs branch April 30, 2025 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants