Charis
4810bbcfdf
feat(studio): guard branch read, delete, reset, and restore with FGA grants ( #52376 )
...
Part 5 of 7 in a stack that splits #52331 into reviewable pieces.
Resolves part of
[FE-4693](https://linear.app/supabase/issue/FE-4693/pilot-migrate-branches-to-grants-8-endpoints-createbranchmodal ).
There are no functional changes beyond #52331 , and the top of the stack
is identical to it. See #52331 for the full rationale.
## Stack
1. #52372 Grant infra for branch variants
2. #52373 Branches list query
3. #52374 Page gates on the list grant
4. #52375 Branch creation
5. 👉 #52376 Branch read, delete, reset, and restore
6. #52377 Branch update and push
7. #52378 Branch diff and merge
## Changes
`useBranchQuery` becomes `branchQueryOptions`. The delete, reset, and
restore mutations take grants. `DeleteBranchModal`, `DeleteBranchPanel`,
and the relevant `Overview` actions use `useBranchGrant`, which picks
production for the default branch and development for preview branches.
Reset previously had no check.
## Testing
New `DeleteBranchPanel` test.
2026-11-02 08:49:19 -05:00
..
2026-10-26 07:58:22 -04:00
2026-04-03 09:15:57 +02:00
2026-10-26 07:58:22 -04:00
2026-08-31 10:55:23 +08:00
2026-11-02 11:26:29 +01:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-29 16:15:21 +01:00
2026-10-22 08:13:39 +00:00
2026-10-26 07:58:22 -04:00
2026-11-02 08:49:19 -05:00
2026-04-03 09:15:57 +02:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-23 18:51:27 +08:00
2026-04-03 09:15:57 +02:00
2026-10-26 07:58:22 -04:00
2026-11-02 18:27:59 +08:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-29 14:39:03 +01:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-04-03 09:15:57 +02:00
2026-07-31 16:18:25 +08:00
2026-10-26 07:58:22 -04:00
2026-09-11 12:17:49 +08:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-04-03 09:15:57 +02:00
2026-08-27 08:52:52 +00:00
2026-10-09 16:28:49 +08:00
2026-09-11 12:17:49 +08:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-23 18:51:27 +08:00
2026-11-02 14:38:02 +01:00
2026-06-23 11:16:58 -04:00
2026-10-26 07:58:22 -04:00
2026-08-31 10:55:23 +08:00
2026-10-26 07:58:22 -04:00
2026-09-15 12:50:56 +02:00
2026-09-11 12:17:49 +08:00
2026-10-27 21:33:33 +08:00
2026-09-15 11:16:47 +02:00
2026-09-11 12:17:49 +08:00
2026-09-11 12:17:49 +08:00
2026-04-03 09:15:57 +02:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-09-15 12:50:56 +02:00
2026-10-22 13:32:04 -04:00
2026-10-26 07:58:22 -04:00
2026-10-16 14:18:32 -04:00
2026-10-26 07:58:22 -04:00
2026-10-29 12:44:44 +02:00
2026-10-20 17:40:13 +02:00
2026-10-27 09:27:44 +01:00
2026-10-27 12:29:10 +11:00
2026-10-26 07:58:22 -04:00
2026-08-14 15:09:29 +07:00
2026-10-27 14:47:27 +01:00
2026-09-28 15:17:24 +08:00
2026-10-27 12:29:10 +11:00
2026-11-02 18:27:59 +08:00
2026-10-23 18:51:27 +08:00
2026-10-19 21:00:40 +02:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-08-27 17:07:58 +02:00
2026-10-27 09:27:44 +01:00
2026-09-15 12:50:56 +02:00
2026-09-23 09:44:04 +02:00
2026-10-21 06:54:16 -04:00
2026-10-15 10:03:47 +02:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-27 09:27:44 +01:00
2026-05-27 15:19:54 +08:00
2026-10-26 07:58:22 -04:00
2026-10-23 18:51:27 +08:00
2026-09-15 21:46:45 +10:00
2026-10-26 07:58:22 -04:00
2026-10-26 07:58:22 -04:00
2026-10-29 15:16:51 +01:00
2026-10-29 15:16:51 +01:00
2026-01-22 11:17:49 -05:00
2026-10-23 18:51:27 +08:00
2026-10-07 16:15:57 +02:00
2026-03-16 11:22:30 +01:00
2026-04-03 09:15:57 +02:00
2026-10-26 07:58:22 -04:00
2026-10-27 10:48:24 -04:00
2026-10-27 10:48:24 -04:00
2026-10-23 18:51:27 +08:00
2026-10-22 08:13:39 +00:00
2026-10-23 18:51:27 +08:00
2026-06-16 08:02:04 -06:00