Files
supabase/apps/studio/data
CharisandJoshen Lim 9c4919948a fix(policy editor): reduce number of table role access queries (#39601)
* fix(policy editor): reduce number of table role access queries

On the Policies page, every single PolicyTableRow fires off its own
table roles access query (because each query is keyed to an individual
table). For users with many tables (400+), this causes the API to
rate-limit the dashboard.

Changed so that the table roles access query now fetches information for
the entire schema in one go, then organizes it by table.

* Nit refactors

* refactor: return minimal data from table access query

All we need to know is whether a given table has anon or authenticated
access, so just query for the list of tables that match that criteria
from information_schema.role_table_grants.

* refactor(policies page): more efficient sql query for getting anon/auth access tables

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-10-22 14:39:42 +08:00
..
2025-10-06 22:46:30 +00:00
2025-10-14 15:02:00 +08:00
2024-06-05 16:32:24 +07:00
2025-10-17 11:51:06 +02:00
2025-03-27 17:46:57 +08:00
2025-05-26 15:43:14 +02:00
2025-05-26 15:43:14 +02:00
2025-10-20 17:08:19 +02:00
2025-04-04 11:44:09 +02:00
2024-07-04 14:48:10 +08:00