Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
control-plane: change authz grants of unchanged_draft_specs view
Initially, the `unchanged_draft_specs` view was written as being owned by the `authenticated` role in postgres, to ensure that it always used the RLS policies of the caller. But Supabase has revoked the `superuser` attribute of the `postgres` role and no longer provides a way to authenticate as a superuser. This means that `alter view ... set owner to authenticated` no longer works because `authenticated` does not have the necessary permission to create a view. See [this thread](https://github.com/orgs/supabase/discussions/9314) for more. In this case, we're able to work around this by granting select permission to the `authenticated` role. This works because both `draft_specs_ext` and `live_specs_ext` perform their own enforcement of authZ, so it's safe to bypass RLS. Also changes the name of the migration to fix a conflict.
- Loading branch information