Skip to content

Commit e61853c

Browse files
authored
fix(studio): clarify default privileges toggle covers tables (supabase#45458)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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). <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 4a702c4 commit e61853c

4 files changed

Lines changed: 8 additions & 9 deletions

File tree

apps/studio/components/interfaces/ProjectCreation/SecurityOptions.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ export const SecurityOptions = ({ form, layout = 'horizontal' }: SecurityOptions
9999
<FormLabel
100100
className={cn('text-sm text-foreground', !dataApi && 'text-foreground-muted')}
101101
>
102-
Automatically expose new tables and functions
102+
Automatically expose new tables
103103
</FormLabel>
104104
<FormDescription className="text-foreground-lighter">
105-
Grants privileges to Data API roles by default, exposing new tables and
106-
functions.
105+
Grants privileges to Data API roles by default, exposing new tables.
107106
<br />
108107
<strong className="font-medium text-foreground-light">
109108
We recommend disabling this to control access manually.

apps/studio/components/interfaces/Settings/API/PostgrestConfig.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ export const PostgrestConfig = () => {
393393
<FormItem>
394394
<FormItemLayout
395395
layout="flex-row-reverse"
396-
label="Automatically expose new tables and functions"
397-
description="Grants privileges to Data API roles by default, exposing new tables and functions. We recommend disabling this to control access manually."
396+
label="Automatically expose new tables"
397+
description="Grants privileges to Data API roles by default, exposing new tables. We recommend disabling this to control access manually."
398398
>
399399
<FormControl>
400400
<div>

apps/studio/hooks/misc/useDataApiRevokeOnCreateDefault.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { IS_TEST_ENV } from '@/lib/constants'
55
import { useTrack } from '@/lib/telemetry/track'
66

77
/**
8-
* Controls the default state of the "Automatically expose new tables and functions"
8+
* Controls the default state of the "Automatically expose new tables"
99
* checkbox at project creation. When the flag is on, the checkbox defaults
1010
* to unchecked (i.e. revoke SQL runs). When off/absent, the checkbox defaults
1111
* to checked (current behaviour — default grants remain).

apps/studio/pages/integrations/vercel/[slug]/deploy-button/new-project.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,11 @@ const CreateProject = () => {
356356
htmlFor="dataApiDefaultPrivileges"
357357
className="text-sm text-foreground-light flex items-center space-x-2 leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
358358
>
359-
Automatically expose new tables and functions
359+
Automatically expose new tables
360360
</label>
361361
<p className="text-sm text-foreground-muted">
362-
Grants privileges to Data API roles by default, exposing new tables and functions. We
363-
recommend disabling this to control access manually.
362+
Grants privileges to Data API roles by default, exposing new tables. We recommend
363+
disabling this to control access manually.
364364
</p>
365365
</div>
366366
</div>

0 commit comments

Comments
 (0)