mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
> [!WARNING] > This PR relies on #54282 being merged first. ## Problem Database password and token access appear as separate sections in Database Settings, although both control connections to Postgres. ## Solution Group the existing controls under **Database access**, with **Password access** first and the switch beside **Token access**. Nest **Members** inside the Token access card and label its action **Add member**. Preserve the existing feature gates, permissions, toggle behaviour, dialogs and section anchors. Use shared card headings for Members, centre the token switch beside its description, and darken the Members table header. Update the matching token-access and password-reset docs instructions. ```text Database access ├── Password access └── Token access [switch] └── Members [Add member] ``` | After | | --- | | <img width="735" height="818" alt="CleanShot 2026-12-01 at 15 56 50" src="https://github.com/user-attachments/assets/f1207a2f-80d5-480a-9529-e110b960f427" /> | | _App [token] access coming separately in https://github.com/supabase/supabase/pull/53917._ | ## Review instructions 1. Open a project's **Database → Settings** page. Check that **Database access** contains **Password access** first, with the existing **Reset database password** button. 2. With the database token access preview enabled, check that **Token access** has its switch on the same row and **Members** appears inside the same card when enabled. Check that **Add member** opens the existing access rule sheet. 3. Check the existing enable confirmation and password reset dialog. Projects requiring SSL enforcement or a Postgres upgrade should keep their existing notices and actions.
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import {
|
|
PageSection,
|
|
PageSectionContent,
|
|
PageSectionDescription,
|
|
PageSectionMeta,
|
|
PageSectionSummary,
|
|
PageSectionTitle,
|
|
} from 'ui-patterns/PageSection'
|
|
|
|
import { ResetDbPassword } from './ResetDbPassword'
|
|
import { useIsJitDbAccessEnabled } from '@/components/interfaces/App/FeaturePreview/FeaturePreviewContext'
|
|
import { JitDbAccessConfiguration } from '@/components/interfaces/Settings/Database/JitDatabaseAccess/JitDbAccessConfiguration'
|
|
|
|
export function DatabaseAccess() {
|
|
const isJitDbAccessEnabled = useIsJitDbAccessEnabled()
|
|
|
|
return (
|
|
<PageSection>
|
|
<PageSectionMeta>
|
|
<PageSectionSummary>
|
|
<PageSectionTitle>Database access</PageSectionTitle>
|
|
<PageSectionDescription>
|
|
Manage how members and apps connect to Postgres.
|
|
</PageSectionDescription>
|
|
</PageSectionSummary>
|
|
</PageSectionMeta>
|
|
<PageSectionContent className="space-y-4">
|
|
<ResetDbPassword />
|
|
{isJitDbAccessEnabled && <JitDbAccessConfiguration />}
|
|
</PageSectionContent>
|
|
</PageSection>
|
|
)
|
|
}
|