Files
Danny White 30a1b38da0 feat(studio): rename temporary access to database token access (#54282)
## Problem

The database access preview still uses “Temporary access” across its
settings and member rules.

## Solution

Use “Database token access” for the feature and “Member access” for
member rules. Update the preview, settings, dialogs, feedback, member
status messages and docs together. Move the guide to
`/guides/platform/token-access`, permanently redirect the old URL, and
preserve existing section anchors.

## Review instructions

1. Open [the Studio
preview](https://studio-staging-git-dnywh-database-token-access-naming-supabase.vercel.app),
then Feature previews and find **Database token access**. Enable the
preview for a supported project, then open [Database
Settings](https://studio-staging-git-dnywh-database-token-access-naming-supabase.vercel.app/project/_/database/settings).
2. Check the **Database token access** heading, **Allow token access**
switch and **Member access** table. Open **Add rule** and an existing
rule to check the sheet titles. Open a rule’s delete confirmation and
cancel it.
3. With an assigned role, check the access status above the member
table. As a member without management permission, check the access
notice uses the same feature name.
4. Open the [database token access guide in the docs
preview](https://docs-git-dnywh-database-token-access-naming-supabase.vercel.app/docs/guides/platform/token-access).
Check the guide and navigation use the new name, the dashboard
instructions match Studio, and the existing section links from the
member guide still work. Open `/docs/guides/platform/temporary-access`
and its `.md` variant to check they permanently redirect to the new
URLs.

| Before | After |
| --- | --- |
| <img width="726" height="367" alt="CleanShot 2026-11-30 at 16 06 00"
src="https://github.com/user-attachments/assets/be351f0c-d578-4289-8785-5c4e69a254a7"
/> | <img width="729" height="374" alt="CleanShot 2026-11-30 at 16 05
38"
src="https://github.com/user-attachments/assets/f02b470d-ef1a-4b6c-bdbb-20fe10b847c6"
/> |
2026-12-02 00:03:43 +00:00

70 lines
2.0 KiB
TypeScript

import {
AlertDialog,
AlertDialogAction,
AlertDialogBody,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from 'ui'
import { Admonition } from 'ui-patterns/Admonition'
import type { JitUserRule } from './JitDbAccess.types'
interface JitDbAccessDeleteDialogProps {
user: JitUserRule | null
isDeleting: boolean
error?: string | null
onClose: () => void
onConfirm: () => unknown
}
export function JitDbAccessDeleteDialog({
user,
isDeleting = false,
error,
onClose,
onConfirm,
}: JitDbAccessDeleteDialogProps) {
const userDisplayName = user?.name?.trim() || user?.email || 'this user'
return (
<AlertDialog open={!!user} onOpenChange={(open) => !open && !isDeleting && onClose()}>
<AlertDialogContent size="small">
<AlertDialogHeader>
<AlertDialogTitle>Delete member access rule</AlertDialogTitle>
<AlertDialogDescription asChild>
<div className="space-y-2 text-sm">
<p>
Remove the member access rule for{' '}
<strong className="text-foreground">{userDisplayName}</strong>?
</p>
<p>
This revokes any assigned database roles for this member and removes their member
access configuration.
</p>
</div>
</AlertDialogDescription>
</AlertDialogHeader>
{error && (
<AlertDialogBody>
<Admonition
type="destructive"
title="Unable to delete member access rule"
description={error}
/>
</AlertDialogBody>
)}
<AlertDialogFooter>
<AlertDialogCancel disabled={isDeleting}>Cancel</AlertDialogCancel>
<AlertDialogAction variant="danger" loading={isDeleting} onClick={onConfirm}>
Delete rule
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}