From e61853c59cc512d4fe155b245bf177b6bbbd65e8 Mon Sep 17 00:00:00 2001 From: Inian Date: Mon, 4 May 2026 17:35:02 +0800 Subject: [PATCH] fix(studio): clarify default privileges toggle covers tables (#45458) ## Summary by CodeRabbit * **Documentation** * Updated UI labels and descriptions across the Data API settings to clarify that default privileges apply to new tables only (removed references to functions). --- .../interfaces/ProjectCreation/SecurityOptions.tsx | 5 ++--- .../components/interfaces/Settings/API/PostgrestConfig.tsx | 4 ++-- apps/studio/hooks/misc/useDataApiRevokeOnCreateDefault.ts | 2 +- .../vercel/[slug]/deploy-button/new-project.tsx | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx b/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx index 20207b00b43..ebb0465d0c8 100644 --- a/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx +++ b/apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx @@ -99,11 +99,10 @@ export const SecurityOptions = ({ form, layout = 'horizontal' }: SecurityOptions - Automatically expose new tables and functions + Automatically expose new tables - Grants privileges to Data API roles by default, exposing new tables and - functions. + Grants privileges to Data API roles by default, exposing new tables.
We recommend disabling this to control access manually. diff --git a/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx b/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx index 38828405e19..c1d3fcdaf0e 100644 --- a/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx +++ b/apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx @@ -393,8 +393,8 @@ export const PostgrestConfig = () => {
diff --git a/apps/studio/hooks/misc/useDataApiRevokeOnCreateDefault.ts b/apps/studio/hooks/misc/useDataApiRevokeOnCreateDefault.ts index 29f589ee6db..077d63e2308 100644 --- a/apps/studio/hooks/misc/useDataApiRevokeOnCreateDefault.ts +++ b/apps/studio/hooks/misc/useDataApiRevokeOnCreateDefault.ts @@ -5,7 +5,7 @@ import { IS_TEST_ENV } from '@/lib/constants' import { useTrack } from '@/lib/telemetry/track' /** - * Controls the default state of the "Automatically expose new tables and functions" + * Controls the default state of the "Automatically expose new tables" * checkbox at project creation. When the flag is on, the checkbox defaults * to unchecked (i.e. revoke SQL runs). When off/absent, the checkbox defaults * to checked (current behaviour — default grants remain). diff --git a/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx b/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx index 6565696c7eb..dad6d3c07fa 100644 --- a/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx +++ b/apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx @@ -356,11 +356,11 @@ const CreateProject = () => { htmlFor="dataApiDefaultPrivileges" className="text-sm text-foreground-light flex items-center space-x-2 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" > - Automatically expose new tables and functions + Automatically expose new tables

- Grants privileges to Data API roles by default, exposing new tables and functions. We - recommend disabling this to control access manually. + Grants privileges to Data API roles by default, exposing new tables. We recommend + disabling this to control access manually.